React Native app shows error when clicked on debug in Android emulator
Attempt to invoke interface method java.lang.String .facebook.react.bridge.Cat alystInstance.getSourceURL('on a null object reference
below are error screenshots
Emulator screenshot:
Debugger screenshot:
When clicked on reload app crashes and lost connection to debugger.
Tried uninstalling and reinstalling apk in emulator and cd android ./gradlew clean.
Still same error.
React Native app shows error when clicked on debug in Android emulator
Attempt to invoke interface method java.lang.String .facebook.react.bridge.Cat alystInstance.getSourceURL('on a null object reference
below are error screenshots
Emulator screenshot:
Debugger screenshot:
When clicked on reload app crashes and lost connection to debugger.
Tried uninstalling and reinstalling apk in emulator and cd android ./gradlew clean.
Still same error.
Share edited Jan 13, 2022 at 7:16 Sudharsan Palanisamy asked Jan 13, 2022 at 7:04 Sudharsan PalanisamySudharsan Palanisamy 1331 gold badge1 silver badge8 bronze badges 4- If you don't turn on the debugger, there will be an error, right? – hong developer Commented Jan 13, 2022 at 7:23
- Did you installed react-native-reanimated? – ZFloc Technologies Commented Jan 13, 2022 at 8:29
- yes - "react-native-reanimated": "^2.2.0", @thanhal – Sudharsan Palanisamy Commented Jan 13, 2022 at 10:36
- Then see my answer below – ZFloc Technologies Commented Jan 13, 2022 at 10:37
1 Answer
Reset to default 5I have faced same issue and it was due to the 'react-native-reanimated' package (It's mentioned in their documentation that remote debugging is no longer possible for react-native-reanimated : React Native Reanimated Known problems and limitations) and the solution is to use flipper to debug : Debugging React Native apps with Flipper