You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to this issue from Miscord - noting here as it seems to be handled within this codebase.
Lightspeed clients - iOS per the linked issue as well as facebook.com/messenger desktop browser site on my side at the least - appear to add some randomized gibberish in front of message data, causing message parsing to fail:
Error while parsing the following message: (�9hjaimLxSMet4EwK36vf9A�{"deltas":[{"deltaNewMessage":{"messageMetadata":{"threadKey":{"threadFbId":1503335003032641},"messageId":"mid.$gAAVXRnTVjEF_V0jSTF5JgOIPszg1","offlineThreadingId":6794103221279471669,"actorFbId":1636270833,"timestamp":1619840436812,"shouldBuzzDevice":true,"tags":["source:chat:light_speed","app_id:2220391788200892"],"threadReadStateEffect":2,"skipBumpThread":false,"cid":{"conversationFbid":1503335003032641}},"body":"test","attachments":[]}}],"firstDeltaSeqId":265093,"lastIssuedSeqId":265093,"queueEntityId":100034260730370} Error while parsing the following message: (�9hjaimLxSMet4EwK36vf9A�
This seems to be randomized such that it does not always insert problematic characters, as it does work fine more often than not in my experience.
Suggestion for a fix:
It seems that the actual data after after the gibberish string consistently starts with {"deltas": - as such I wonder if cutting out everything before {"deltas": would resolve the issue. In my head this would be something like: ms = ((ms.indexOf('{"deltas"') > 0) ? ms.substr(ms.indexOf('{"deltas"')) : ms) right above here https://github.com/ChatPlug/libfb-js/blob/master/src/Client.ts#L312
Will test myself if I get a chance
The text was updated successfully, but these errors were encountered:
Related to this issue from Miscord - noting here as it seems to be handled within this codebase.
Lightspeed clients - iOS per the linked issue as well as facebook.com/messenger desktop browser site on my side at the least - appear to add some randomized gibberish in front of message data, causing message parsing to fail:
Error while parsing the following message: (�9hjaimLxSMet4EwK36vf9A�{"deltas":[{"deltaNewMessage":{"messageMetadata":{"threadKey":{"threadFbId":1503335003032641},"messageId":"mid.$gAAVXRnTVjEF_V0jSTF5JgOIPszg1","offlineThreadingId":6794103221279471669,"actorFbId":1636270833,"timestamp":1619840436812,"shouldBuzzDevice":true,"tags":["source:chat:light_speed","app_id:2220391788200892"],"threadReadStateEffect":2,"skipBumpThread":false,"cid":{"conversationFbid":1503335003032641}},"body":"test","attachments":[]}}],"firstDeltaSeqId":265093,"lastIssuedSeqId":265093,"queueEntityId":100034260730370} Error while parsing the following message: (�9hjaimLxSMet4EwK36vf9A�
This seems to be randomized such that it does not always insert problematic characters, as it does work fine more often than not in my experience.
Suggestion for a fix:
It seems that the actual data after after the gibberish string consistently starts with
{"deltas":
- as such I wonder if cutting out everything before{"deltas":
would resolve the issue. In my head this would be something like:ms = ((ms.indexOf('{"deltas"') > 0) ? ms.substr(ms.indexOf('{"deltas"')) : ms)
right above here https://github.com/ChatPlug/libfb-js/blob/master/src/Client.ts#L312Will test myself if I get a chance
The text was updated successfully, but these errors were encountered: