app crash in release build only
See original GitHub issueEnvironment
Environment: OS: Windows 10 Node: 8.12.0 Yarn: Not Found npm: 6.4.1 Watchman: Not Found Xcode: N/A Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5056338
Packages: (wanted => installed) react: ^16.5.2 => 16.5.2 react-native: ^0.55.4 => 0.55.4
Description
I have problem with release build of react native. App successfully generated and install in device but crash while open the app.
With android studio LOGCAT I get the log of app and this is the error
018-10-31 23:46:36.803 23221-23239/? D/ReactNative: CatalystInstanceImpl.runJSBundle()
--------- beginning of crash
2018-10-31 23:46:36.804 23221-23239/? E/AndroidRuntime: FATAL EXCEPTION: Thread-2
Process: com.myter.parsandishan.parvak, PID: 23221
java.lang.RuntimeException: Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or you're running a packager server.
at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:216)
at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:31)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:234)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1114)
at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:113)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:911)
at java.lang.Thread.run(Thread.java:764)
of course in debug build app work correctly with any problem
I searched a lot in previous issue and stackoverflow but any of them wasn’t for release build.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
How to Resolve Android App Crashes in Release Build Type ...
Android app crashes in phone when build using Release Type but works fine when build using debug build type or if debugging is...
Read more >Crashes on release build of app but works fine on debug ...
Summary. Loading the map works fine on debug build but not release. Expected behavior. No crash. Observed behavior. Crash when loading map ...
Read more >app crashes at launch as release b… | Apple Developer Forums
I have imported ios-charts in my Objective-C project, and running it in debug mode is fine. However, today I tried to archive and...
Read more >Android App suddenly crashes when compiling in Release ...
Hi. My App was working fine when build to release mode, and both when downloading from Google play store or from a Android...
Read more >app crash on startup only in release build - Unity Forum
app crash on startup only in release build · 1 libsystem_pthread. · 2 UnityFramework 0x10c021b78 0x10a214000 + 31513464 · 3 UnityFramework ...
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 FreeTop 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
Top GitHub Comments
@ingviso do this steps in terminal at project root directory 1.(in project directory)
mkdir android/app/src/main/assets
2.react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
this produce 2 files that fix the problem. if other files created delete them for determines other files you can use git. 3.react-native run-android
this fix the problem for me
It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.
The “⏪Old Version” label will be removed automatically once you edit your original post with the results of running
react-native info
on a project using the latest release.