react-native-qrcode-styled icon indicating copy to clipboard operation
react-native-qrcode-styled copied to clipboard

Property 'TextEncoder' doesn't exist

Open BishalftSaikia opened this issue 1 year ago • 4 comments

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 avatar Aug 07 '24 05:08 BishalftSaikia

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

BishalftSaikia avatar Aug 07 '24 08:08 BishalftSaikia

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

vevnkataSukumar avatar Aug 07 '24 11:08 vevnkataSukumar

@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

BishalftSaikia avatar Aug 07 '24 12:08 BishalftSaikia

Bump

pfcodes avatar Nov 07 '24 06:11 pfcodes

Hi! Would love to see this added to the library itself

valeriiamykhalova avatar May 26 '25 07:05 valeriiamykhalova