wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.58k stars 540 forks source link

recent update of the package causes js engine: hermes errors #749

Closed mickykro closed 1 year ago

mickykro commented 1 year ago

What react-native version are you using? 0.71.0 What react-native-pdf version are you using? 6.7.1 What platform does your issue occur on? (android/ios/both) both Describe your issue as precisely as possible : 1) Steps to reproduce the issue or to explain in which case you get the issue 2) Interesting logs

the apps work perfectly when import Pdf from 'react-native-pdf'; is commented, and when i uncomment that line the errors occur.

Android:

 ERROR  TypeError: Cannot read property 'getConstants' of null, js engine: hermes
 LOG  Running "smartTravel" with {"rootTag":11}
 ERROR  Invariant Violation: "smartTravel" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

IOS

 ERROR  Invariant Violation: `new NativeEventEmitter()` requires a non-null argument., js engine: hermes
Process terminated. Press <enter> to close the window

Join a screenshot or video of the problem on the simulator or device?

IOS video

https://github.com/wonday/react-native-pdf/assets/60981756/bdbb06eb-bf83-4363-bb80-911d4b212f07

Android screenshot

Screenshot 2023-06-29 at 11 02 48
mickykro commented 1 year ago

solved it by removing another package that used blob. it was rn-fetch-blob and this package uses react-native-blob-util.

p4bl1t0 commented 9 months ago

I don't have any othe fetch-blob package installed and I'm getting this same issue.

andrew-fulcrum-dev commented 8 months ago

Still have error Any solution ?

ORODeveloper commented 6 months ago

Removing rn-fetch-blob resolved my issue. Thank You