Error from Chat SDK when calling "buildFromSerializedData" on a message with reactions

So this is a difficult one…

On our chat system, when we receive messages, we store them in indexdb, before storing them, we call serialize() on the message. When we pull them out of the store, we call buildFromSerializedData(message).

This works… up until a reaction is added to the message.
At first i thought it was something to do with us storing in indexdb… so i wrote a script in chrome sources panel. It turns out it is an issue with the chat sdk.

You can view the script here:

It’s pretty rough/hacky, but i just wanted to be 100% sure it wasn’t something weird caused by our implementation. It tests the raw use case without anything external taking control.

We have built our own “sync manager” to handle our extended use cases. So the way we access sendbird in this case is via that, but this code follows sendbirds documentation on how to implement reactions.

Have I done something wrong or is this an SDK issue?

Error from the SDK is:

Can you share one sample object you’re trying to serialize?

I’m currently streaming on twitch if it would be easier to run through anything in real-time with you?

If not, any preference on how i show you this data? printscreen, json?

Maybe a JSON object rather than a printscreen so I can take a look at its elements. Thanks.

No problem;

One before applyReactionEvent()

One after applyReactionEvent()

One of the object after serialize() is called

Sorry 1 minute, i might have got those previews mixed up :expressionless:




VSCode overwrote the other files somehow, here are the correct ones

As a side question;

Would it be possible for us to access some sendbird functions without a specific sendbird handled object?

For example, with channels and their object from the SDK. They have methods like
startTyping etc

If we were to build our own object and manage it’s state for channels and messages. Can we access these methods a different way or are they private and can only be called explicitly on a sendbird object?

This would solve our issue, it’s not the first time we’ve been held up with a serialization issue like this one

Would it be in any help instead of serializing objects, get all its details using Platform API?

About functions like typing indicators, have you checked here?

We could possibly go that route with pulling messages/channels this way… it just relies on our server and scaling that up, rather than utilizing the service we pay for to it’s full extent

With the typing indicators though for example; We could only trigger “startTyping” “endTyping” via a sendbird object though correct?

There is no static method like “markAsDelivered” has?

I also can’t see any endpoint to trigger typing status via platform api neither

You’re correct. That’s the only way to send typing commands.

So what do we do? :thinking:

We’re about a year deep in development with Senbird and have native ios/android apps built around it too

If we can’t rely on serialization, cant use sendbird syncmanager for our other edge-cases and we can’t call certain methods unless we do. It’s almost left us at a dead end from a tech perspective…

I can open a ticket and see more about the serialization error you have in your screenshot.

You mentioned that Sendbird’s SyncManager does not have some functions you need, correct? Can you please describe them? I can check if there’s a way to do what you need using Sendbird’s SyncManager.

I would appreciate that

There was these issues in this thread
We also had some weird scenario where unless we got two versions matching by incrementing the version number on each package, they would not communicate correctly and all sorts of random errors were being thrown
We also ideally needed a way to attach some additional data to be stored in indexdb, without having to save the data on the “data” object of a channel/message

Ultimately we couldn’t find a way and built our own solution that worked really well up until we decided to implement Reactions

I also just found that I can do this to send a typing notification; Any hints or anything against me using this?

let ch = new sendbird.GroupChannel();
ch.url = 'bf7ea026-6379-4642-b5c8-633e9eb6d661';

It seems to send a socket event, but I can’t test if i can receive it at the moment

For the last part (the startTyping()), sorry if I was not clear on this but this is exactly what I wanted to point out :blush:

To test it you should add a handler. check here: