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 'TextEncoder' doesn't exist #11

Open
BishalftSaikia opened this issue Aug 7, 2024 · 4 comments
Open

Property 'TextEncoder' doesn't exist #11

BishalftSaikia opened this issue Aug 7, 2024 · 4 comments

Comments

@BishalftSaikia
Copy link

Hi there, this library stopped working after i did a clean build, getting error ::

  1. QRCode error: ReferenceError: Property 'TextEncoder' doesn't exist at SVGQRCodeStyled

  2. Invariant Violation: [3427,"RNSVGLinearGradient",1,{"x1":"<<NaN>>","y1":"<<NaN>>","x2":"<<Infinity>>","y2":"<<Infinity>>","name":"topLeftCornerSquareGradient","gradient":[0,-16777216,1,-1],"gradientUnits":1,"gradientTransform":null}] is not usable as a native method argument

  3. Error: Exception in HostFunction: Malformed calls from JS: field sizes are different. [[75,75,75,75,75,75,75],[5,5,5,5,5,5,5],[[3443,"RNSVGGroup",1,{"propList":["fill"],"fill":{"payload":4278190080,"type":0}}]],3233]

versions ::

  1. react-native: "0.73.6",
  2. react-native-qrcode-styled: "^0.3.1",
  3. node v22.4.1

screenshots ::
Screenshot 2024-08-07 at 10 49 05 AM
Screenshot 2024-08-07 at 10 48 58 AM
Screenshot 2024-08-07 at 10 48 51 AM

Please suggest how to resolve the issue, Thank you

@BishalftSaikia
Copy link
Author

update :: adding polyfill seems to resolve the issue for now, import 'text-encoding-polyfill';

@vevnkataSukumar
Copy link

@BishalftSaikia where exactly do we need to add the Polyfill?

@BishalftSaikia
Copy link
Author

@vevnkataSukumar in your entry file(index.js) just paste the import on top, you can also use import 'fast-text-encoding'; this lib is maintained

@pfcodes
Copy link

pfcodes commented Nov 7, 2024

Bump

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

3 participants