-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application crashing only in release mode, how to debug this kind of problem? #18680
Comments
Thanks for posting this! It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest release, v0.55? Thank you for your contributions. |
after 5 days looking for the issue i found out the problem was that my index.ios.js was calling my main class like this For anyone that got stuck in release bugs like me try installing the haul library https://github.com/callstack/haul, it still has many bugs, but it gives much better error messages then the react native core. Debugging this problem would be impossible if i had not found haul. I also had to use haul to bundle the javascript without minification to be able to find about the bug. |
@vzaffalon how to make a release build without minification please ? ! my app also running so good on debug mode but crashes when i make release. can not figure out where is the error. how to make a release build without minifaction so i can know the exact error ? ! thank you in advance . |
use Haul bundle --minify false before running the application, after i found the error i had to uninstal haul because it was causing integration bugs with realm library, suggest you do the same |
thank you for your reply i really apperciate. i did that and now the error message is different WARNING: Logging before InitGoogleLogging() is written to STDERR i have no clue what is that. i also had to remove haul cause it's giving lots of other errors while using redux saga while the debug mode is just working fine. i also made new question on stack maybe someone can help https://stackoverflow.com/questions/49815999/app-release-crashes-t-is-not-a-function thank u |
This comment has been minimized.
This comment has been minimized.
You can use |
It only crash in release. Debug mode is fine. |
++ |
Destructuring of an empty object may be the reason, |
Environment
Environment:
OS: macOS High Sierra 10.13
Node: 9.10.1
Yarn: Not Found
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: ^16.3.0 => 16.3.0
react-native: ^0.55.0 => 0.55.0
Steps to Reproduce
Follow the steps in https://facebook.github.io/react-native/docs/running-on-device.html, Building your app for production.
Run a release build. Open Xcode. Go to edit schemes. Change the Run build configuration from Debug to Release. Or you can run it from terminal: react-native run-ios --configuration Release
Expected Behavior
JS bundle completes launch and app doesn't crash.
Actual Behavior
App crashes when the JS bundle loads. Here is the crash log:
*** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Cannot call a class as a function', reason: 'Unhandled JS Exception: Cannot call a class as a function, stack: classCallCheck@11:648 t@306:876 run@279:617 runApplication@279:2046 value@18:3471 <unknown>@18:956 value@18:2898 value@18:928
My application works fine on release for Android, and also works fine in debug mode on iOS, the problem only appears on iOS release mode. How should i debug problems in release mode? I Tried to reident and look at the lines of code suggested on the error message in the main.jsbundle, but i haven't been able to find the source of the problem anyway.
I tried everything i found on the issues #18647 #16567 and in similar issues. My application code is huge so i cant check every react class to find the problem(although i tried). Should i try to reinstall all my dependencies from zero until i find what is causing the problem? It seems like react native have absolutely no support for this kind of release bugs problem from the other issues i have seen.
The text was updated successfully, but these errors were encountered: