ably-forks / vcdiff-decoder

Pure JavaScript Vcdiff decoder. Compatible with patches from open-vcdiff and xdelta.
Other
3 stars 2 forks source link

Error processing the utf-8 encoding, decoder returned ‘Property 'TextDecoder' doesn't exist #48

Open anthlasserre opened 8 months ago

anthlasserre commented 8 months ago

Hey Ably,

I've been facing an issue with implementing the vcdiff-decoder library within a React Native project.

Ably: RealtimeChannel.onMessage(): [ErrorInfo: Error processing the utf-8 encoding, decoder returned ‘Property 'TextDecoder' doesn't exist’; statusCode=400; code=40013]

I have finally fixed it by importing text-encoding-polyfill at the very root of the app.

I think you should add in the documentation this specific React Native installation.

PR has been raised just below 👇🏼

lawrence-forooghian commented 6 months ago

Hi @anthlasserre — thanks for raising this issue; we'll investigate and decide the best way to implement support for React Native.