Open ArturBuja opened 2 weeks ago
Can you check your native logs for the root error ?
What do you mean native error? I get this error right away at the start of the application. I can possibly send a screenshot of the error. Or you mean log from logcat?
I mean, this is most likely an error from the javascript part of your application, and you most likely have an error from the native part (kotlin or java) part, connect to a native debugger an check if you have any native error
I mean, this is most likely an error from the javascript part of your application, and you most likely have an error from the native part (kotlin or java) part, connect to a native debugger an check if you have any native error
This error start appear when I added the code above, and if I remove these piece of code the error disappears, but I'll check the native errors
I run RN Debbuget and in the console I can see:
But its nothing new, at 19 there is an import RNScreenshotPrevent from 'react-native-screenshot-prevent';
I honestly don't know how to debug this more precisely. I also run a logcat in Android Studio but there is nothing special about this message.
Can you share your logcat ?
ok, from fresh start: https://drive.google.com/file/d/117TLKMSKHvGsT-nSUJ4c61vA2x9sLNc6/view?usp=sharing
I see nothing obvious sadly sorry :( We used to have similar issues when using this lib with codepush, do you have some lib that might restart your app ?
My app works fine, there is no restart in the app just the error. In my package.json there is nothing special
"@adrianso/react-native-device-brightness": "^1.2.7",
"@eabdullazyanov/react-native-sms-user-consent": "^1.2.0",
"@notifee/react-native": "^9.1.1",
"@react-native-async-storage/async-storage": "^2.1.0",
"@react-native-community/netinfo": "^11.4.1",
"@react-native-firebase/app": "^21.0.0",
"@react-native-firebase/messaging": "^21.0.0",
"@react-navigation/material-top-tabs": "^6.6.14",
"@react-navigation/native": "^6.1.18",
"@react-navigation/native-stack": "^6.11.0",
"@reduxjs/toolkit": "^2.2.8",
"@sentry/react-native": "^5.34.0",
"axios": "^1.7.7",
"bwip-js": "^4.5.1",
"core-js": "^3.38.1",
"dotenv": "^16.4.5",
"i18next": "^23.15.2",
"i18next-chained-backend": "^4.6.2",
"i18next-http-backend": "^2.6.2",
"i18next-resources-to-backend": "^1.2.1",
"intl-pluralrules": "^2.0.1",
"jwt-decode": "^4.0.0",
"libphonenumber-js": "1.10.59",
"nativewind": "^2.0.11",
"ncp": "^2.0.0",
"react": "18.3.1",
"react-i18next": "^15.0.2",
"react-native": "0.75.4",
"react-native-bootsplash": "^6.2.2",
"react-native-config": "^1.5.3",
"react-native-contacts": "^7.0.8",
"react-native-country-codes-picker": "^2.3.5",
"react-native-date-picker": "^5.0.7",
"react-native-device-info": "^13.0.0",
"react-native-devsettings": "^1.0.5",
"react-native-encrypted-storage": "^4.0.3",
"react-native-fast-image": "^8.6.3",
"react-native-flash-message": "^0.4.2",
"react-native-modal": "^13.0.1",
"react-native-otp-entry": "^1.7.2",
"react-native-pager-view": "^6.4.1",
"react-native-permissions": "^4.1.5",
"react-native-safe-area-context": "^4.11.0",
"react-native-screens": "^3.34.0",
"react-native-screenshot-prevent": "^1.2.1",
"react-native-sim-cards-manager": "^1.0.24",
"react-native-size-matters": "^0.4.2",
"react-native-svg": "^15.7.1",
"react-native-tab-view": "^3.5.2",
"react-native-vision-camera": "^4.6.0",
"react-redux": "^9.1.2",
"react-zlib-js": "^1.0.5"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native-community/cli": "^14.1.1",
"@react-native/babel-preset": "0.75.4",
"@react-native/eslint-config": "0.75.4",
"@react-native/metro-config": "0.75.4",
"@react-native/typescript-config": "0.75.4",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"husky": "^9.1.6",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-native-svg-transformer": "^1.5.0",
"react-test-renderer": "18.3.1",
"tailwindcss": "3.3.2",
"typescript": "5.0.4"
},
Hello: RN info:
"react-native-screenshot-prevent": "^1.2.1",
Code example:
I got the error:
`new NativeEventEmitter()
was called with a non-null argument without the requiredaddListener
method.` When I started the app. The code above doesn't even run then I got the following error.