Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
App is crashing on launch - only on Release build #17276
Is this a bug report?
Have you read the Contributing Guidelines?
Packages: (wanted => installed)
Steps to Reproduce
react-native run-ios --configuration Release
Also getting this from AppStore review after uploading to AppStore
App should not crash on launch.
App crashes on launch
Here is the crash log:
Exception Type: EXC_CRASH (SIGABRT)
Application Specific Information:
Last Exception Backtrace:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 1 name: Dispatch queue: com.facebook.react.ExceptionsManagerQueue
im also having this issue.
assertion failed: 17B1003 15C107: libxpc.dylib + 72226
edit: found this after digging through the logs.
*** Terminating app due to uncaught exception ’RCTFatalException: Unhandled JS Exception: undefined is not an object (evaluating ‘s.View.propTypes.style’)’, reason: ’Unhandled JS Exception: undefined is not an object (evaluating ’s.View.prop..., stack:
my issue is probably related to NativeBase and not RN:
About the issue of @toppetoppe , I had the same and (for me worked in this way) the problem is that you still have old packages using PropTypes from React. Just update the packages at the last versions.
If I try to build with AndroidStudio, it shows APK(s) generated successfully:
the warnings in the LogCat are:
The APK, once installed on the smart phone, does the same. When launched, it crashes without message.
Here my package.json:
I think is an issue with the last version of react-native, despite I adapted everything I had to do (I suppose).
So I still haven't managed to resolve this issue. I have gone through my code and updated any mention of View.propTypes.style to ViewPropTypes.style and removed any mention of importing PropTypes from React (importing it from 'prop-types' instead).
the app crashes straight away.
I have trawled the internet for possible clues but haven't found anything of use.
I must say that this is the most infuriating issue I've ever come across - and I really have no clues as to how to resolve it. Having something work perfectly well in development but then consistently fail with the release build is utterly painful. This is preventing me from submitting my app to the App Store, making me wonder if RN is actually worth any of the effort.
I'm running into this issue as well and when I grep in my project for
OK, so I had to leave my project for a few weeks while I worked on something else. I have just come back to it and have managed to resolve the issue.
For those who still have a similar issue, the key is to replace every use of
@wmcbain 's comment helped me to identify the libraries I was using that haven't been updated yet.
You have to do this in any third-party libraries you use as well as in all your own code.
I hope this helps someone.
I had the same problem, both on android, and iOS, and only on production, the app would build successfully but on the device (or simulator) it would keep crashing on launch.
So i ran my project in xCode+Simulator using the release schema, and when the app crashed the xCode logs had this error:
babelHelpers.objectDestructuringEmpty is not a function.
So after some digging around I found out that when building for production release, babel tries to optimize everything in the JS code, but it doesn't handle empty destructuring well.
I had a
Hi, my iOS app is crashing in release as well. I am in the process of upgrading from 0.48.4 to 0.54.
I did run grep as seen above and got the following output. I am not using View.propTypes.style anywhere (other than a comment) but I am using ListView.propTypes.style. Does this matter? Any Ideas?
referenced this issue
Apr 13, 2018
I have updated my dependencies by replacing View.propTypes with ViewPropTypes.
@craigdub solved it using react-codemod transform scripts and jscodeshift ..!!!
Hey @Manish3323 ! Could you give more details on how you did that?
@wmcbain I have tried this, but I found "View.proptypes.style" in my code as well as in one of the third party library of stripe payment, 'Tipsi-Stripe'. It is in Card.js.html file.
I have changed it to ViewProptypes.style in js files but as Card.js.html is an HTML file, should I change it too?
In my case, when Release I got a message like: