`new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method
What react-native version are you using?
0.74.5
What react-native-pdf version are you using?
6.7.5
What platform does your issue occur on? (android/ios/both)
ios
Describe your issue as precisely as possible :
I have upgraded a project from 73 to 74 bridge less and now this error is showing in my logs. I have pinned it down to this library. When I remove the import of react-native-pdf I don't get the warning.
Join a screenshot or video of the problem on the simulator or device?
Show us the code you are using?
<Pdf
trustAllCerts={false}
source={source}
onLoadComplete={(numberOfPages, filePath) => {}}
onPageChanged={(page, numberOfPages) => {}}
onError={(error) => {}}
onPressLink={(uri) => {}}
style={styles.pdf}
/>
I am also encountering this issue. My react-native and react-native-pdf versions match @jeppe-smith. Commenting the component removes the error.
I hade the same error message. I am using Expo in my project with the same package versions you described.
in my case after following the documentation instructions described in config-plugins/react-native-pdf repo: https://github.com/expo/config-plugins/tree/main/packages/react-native-pdf
-
install all the required packages
npx expo install react-native-pdf react-native-blob-util @config-plugins/react-native-pdf @config-plugins/react-native-blob-util -
add the plugins in
app.jsonfile
{
"plugins": [
"@config-plugins/react-native-blob-util",
"@config-plugins/react-native-pdf"
]
}
- rebuild my app (in my case creating new custom build with
eas build)
everything worked again without any errors or issues 👍
I also don't get it to work, trying for some hours already 😞 The error keeps showing on iOS.
"@config-plugins/react-native-blob-util": "^9.0.0",
"@config-plugins/react-native-pdf": "^9.0.0",
"expo": "^52.0.24",
"react-native": "0.76.5",
"react-native-blob-util": "^0.19.11",
"react-native-pdf": "^6.7.6",
Hi, We are also facing the same issue, did anyone find a way to fix or workaround?
"react-native": "0.80.1", "react-native-pdf": "^6.7.7", "react-native-blob-util": "^0.22.2",
I have also tried @RaafatDev 's solution, but i didn't work for us:
"@config-plugins/react-native-blob-util": "^11.0.0", "@config-plugins/react-native-pdf": "^11.0.0",
Thanks