Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property 'TextDecoder' doesn't exist #93

Closed
errorstudent opened this issue Dec 24, 2024 · 4 comments
Closed

Property 'TextDecoder' doesn't exist #93

errorstudent opened this issue Dec 24, 2024 · 4 comments

Comments

@errorstudent
Copy link

errorstudent commented Dec 24, 2024

Hi All,
I'm trying to generate keys, but I got error Property 'TextDecoder' doesn't exists.

The code is:

const keys = await RSA.generate(4096);

Simulator Screenshot - iPhone 16 - 2024-12-24 at 12 38 10

@nicolasquintanam
Copy link

I'm currently with the same problem with react native 0.75.4 and old achitecture

@nicolasquintanam
Copy link

this happens only with the version 2.5.0, I tried with 2.4.4 and it works

@holmesjr
Copy link

I've worked around this by explicitly installing the "text-encoding" polyfill.

import 'text-encoding' in the file where you're using RSA and you're good to go.

The problem will also go away if you update expo to SDK 52, as this will use the latest Hermes engine which fixed this (assuming you're using expo).

@jerson
Copy link
Owner

jerson commented Mar 15, 2025

a custom TextEncoder and TextDecoder JSI implementations, is included in latest version, polyfill is not needed anymore

@jerson jerson closed this as completed Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants