After upgrading from RN 0.47 to 0.49, the app crashes in iOS 10 in release mode.
2017-10-21 22:52:35.287874+0800 MyApp[286:15231] Unhandled JS Exception: undefined is not an object (evaluating 'l.View.propTypes.style')
However, there is no problem in debug mode.
May i seek for your help?
Many thanks.
@facebook-github-bot no-template
Hey @pongponglau, thanks for posting this! It looks like your issue is missing some required information. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce your issue. I am going to close this, but please feel free to open a new issue with the additional information provided. Thanks!
How to Contribute • What to Expect from Maintainers
I have exactly the same problem. Please reopen
React-Native 0.49. Xcode 9.0.1. Debug build works just fine on simulator and actual iPhone. Release build crashes on iPhone crashes with above error
@pongponglau did find out anything more?
Same here, for iOS and Android both. Please reopen.
It turned out that a number of third party modules that I was using were not react 16 compliant. I patched them myself or found forks where they had been patched. After I traced them all, things started working. It's not clear why some of them showed up only in release mode, but ultimately they were the culprit.
I would suggest you search your own code and the code in node_modules (third party modules) for things that break in react 16:
If you see them, they need to be fixed.
I checked my dependencies, but they seem to use the prop-types package. Have a look at this issue I posted #16567. It has more details on the issue.
Thank you for your comment btw @ujwal-setlur 😄
Please reopen this issue. There're too many 3-party dependencies need to be fixed!
This is technically not an issue with react-native, thigh I must say the developer experience has been terrible. Previous breaking upgrades have also been terrible experiences, so something absolutely has to be done.
Hi, everyone. After spending tons of time to find out a better solution, I found out there's no need to modify all 3rd party library. The tricky part is to make sure your dev dependencies are correct and use [email protected] to build your release.
"devDependencies": {
"babel-jest": "21.2.0",
"babel-preset-react-native": "4.0.0",
"jest": "21.2.1",
"react-test-renderer": "16.0.0-beta.5"
},
Most helpful comment
It turned out that a number of third party modules that I was using were not react 16 compliant. I patched them myself or found forks where they had been patched. After I traced them all, things started working. It's not clear why some of them showed up only in release mode, but ultimately they were the culprit.
I would suggest you search your own code and the code in node_modules (third party modules) for things that break in react 16:
If you see them, they need to be fixed.