App Crash in Release Build --- FATAL EXCEPTION: create_react_context
See original GitHub issueDescription
I can build in debug mode, it works fine, but when I get release build, it gets build, but the application breaks, you can see the error output here.
React Native version:
“react-native”: “0.62.2”,
##Error
Name
FATAL EXCEPTION: create_react_context
Reason
java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
Stacktrace
FATAL EXCEPTION: create_react_context
Process: com.seeandsign.papilon, PID: 27990
java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(Unknown Source:2)
at com.facebook.react.bridge.JSBundleLoader$1.loadScript(Unknown Source:10)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(Unknown Source:18)
at com.facebook.react.q.q(Unknown Source:180)
at com.facebook.react.q.b(Unknown Source:0)
at com.facebook.react.q$e.run(Unknown Source:68)
at java.lang.Thread.run(Thread.java:764)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:18
Top Results From Across the Web
React Native crash release build - FATAL EXCEPTION
(Android) I created a new project (v0.68.2), I didn't make any changes, the room crashed in the same way. npx react-native run-android --variant ......
Read more >[Solved]-React Native crash release build - FATAL EXCEPTION
Coding example for the question React Native crash release build - FATAL EXCEPTION: create_react_context-React Native.
Read more >Fixing React-Native android release build - wesionaryTEAM
Android release build crashes on launch but works fine in development mode. After months of research and development, your app is finally ready...
Read more >Customize your Firebase Crashlytics crash reports - Google
Crashlytics provides four logging mechanisms out of the box: custom keys, ... your app's crashes, Crashlytics lets you record non-fatal exceptions and sends ......
Read more >View crashes and application not responding (ANR) errors
Using Play Console, you can view data for crashes and application not ... if an issue was found while testing your app to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
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
Top GitHub Comments
@grkemtneri This is not a good solution, you are generating code (index.android.bundle) inside source folder (android/app/src/) during build phase…
react.gradle tasks will generate it in build folder (build/generated/assets/react/…). But like @rahulson says, with latest version of
com.android.tools.build:gradle
, index.android.bundle is not copied inside APK. I downgraded to'com.android.tools.build:gradle:4.0.2'
& it’s works too.@grkemtneri I faced same issue so I changed gradle plugin version in project gradle from 4.1.1 to 4.0.1 Then clean, rebuild and generate apk and now it is working fine