question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Crash when js parse error.

See original GitHub issue

After 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:closed
  • Created 7 years ago
  • Reactions:19
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
idecommented, Jul 12, 2016

Closing because this should be fixed in master ^

0reactions
AndrewJackcommented, Jul 12, 2016

Fixed here https://github.com/facebook/react-native/commit/b5c3550857bd7360e7b5b6e227d795f859202245

It’ll be in 31 unless cherry picked into an earlier release.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found