[Android] Crash when js parse error.
See original GitHub issueAfter update to 0.28, my rn app would crash in android when debug & js parse error. Crash dialog shows with red box, I have to click “Yes” and re-run my code.
There is crash log:
E/ReactNativeJS: Module AppRegistry is not a registered callable module.
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.todofluxapp, PID: 6127
java.lang.NullPointerException: Attempt to invoke interface method 'int com.facebook.react.bridge.ReadableArray.size()' on a null object reference
at com.facebook.react.devsupport.StackTraceHelper.convertJsStackTrace(StackTraceHelper.java:95)
at com.facebook.react.devsupport.DevSupportManagerImpl$3.run(DevSupportManagerImpl.java:228)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:19
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Parse causing crash on android. Cannot catch. #2021 - GitHub
A try catch block will not help at all. It doesn't catch anything. The log message before the parse prints and then the...
Read more >Crashing JSON Parsing Android App - Stack Overflow
Here is the code with the activity and the JSON parsing package com.example.Accomplist; import android.app.Activity; import android.os.
Read more >Crashes - Android Developers
An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.
Read more >How to avoid building apps that crash by parsing JSON the ...
First of all, if the response is a JSON array instead of a dictionary, your app will crash at runtime. And second –...
Read more >App Center Errors - Visual Studio - Microsoft Learn
An uncaught error (crash) is an error that occurs outside of a try/catch block. App Center automatically reports these crashes by default, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing because this should be fixed in master ^
Fixed here https://github.com/facebook/react-native/commit/b5c3550857bd7360e7b5b6e227d795f859202245
It’ll be in 31 unless cherry picked into an earlier release.