App is crashing on release Build (RN 0.54.4)
See original GitHub issue- [Yes ] I have reviewed the documentation
- [Yes ] I have searched existing issues
- [Yes ] I am using the latest React Native version
Environment
Environment: OS: macOS High Sierra 10.13.4 Node: 9.9.0 Yarn: 1.5.1 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.3 Build version 9E145 Android Studio: 2.2 AI-145.3537739
Packages: (wanted => installed) react: ^16.3.0-alpha.1 => 16.3.0 react-native: 0.54.4 => 0.54.4
Steps to Reproduce
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:
2018-04-01 19:32:57.938 [error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating 'u.View.propTypes.style')
2018-04-01 19:32:57.940 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating 'u.View.propTypes.style')
libc++abi.dylib: terminating with uncaught exception of type NSException
I ran grep to look form propTypes.style in my node_modules, but I did not see any use of View.propTypes: grep -R “propTypes.style” node_modules
node_modules/react-native/Libraries/Experimental/SwipeableRow/SwipeableQuickActionButton.js: imageStyle: Image.propTypes.style,
node_modules/react-native/Libraries/Experimental/SwipeableRow/SwipeableQuickActionButton.js: textStyle: Text.propTypes.style,
node_modules/react-native/Libraries/Components/TextInput/TextInput.js: style: Text.propTypes.style,
node_modules/react-native-tab-view/src/TabBar.js: labelStyle: Text.propTypes.style,
node_modules/react-native-autocomplete-input/index.js: listStyle: ListView.propTypes.style,
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (3 by maintainers)
Top Results From Across the Web
app crashes at launch as release b… | Apple Developer Forums
app crashes at launch as release build on iPhone - but debugging is fine. I have imported ios-charts in my Objective-C project, and...
Read more >React Native app crashes immediately on iOS TestFlight
Because my app crashes on launch, but only in TestFlight. The crash reports only show RCTFatal (screenshot below). My RN (0.54) build includes ......
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 >React Native Android release build crash on device - Medium
For me when I found my app is crashing on device, I connected my device with my loptop and used adb logcat command...
Read more >React native app crashes on release build, works fine on debug
Previously we were using RN 0.59 and uograded to 0.62. We migrated almost all of our codes and packages, we tested the app...
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
For future googlers: Understanding the OP did this already, here’s what fixed it for me.
Hey all, I just experienced this issue the other day. In my case, I was using
aws-appsync-react
and it was using a previously-deprecated-now-removed featureView.propTypes.style
, and it should have been using the newViewPropTypes
from thereact-native
package. You can see an example of the changes here:https://github.com/jdeanwaite/aws-mobile-appsync-sdk-js/commit/421b5d340f24caa097f8031ae59c1e4a037350cf
What I did to find the problem was open the project in your IDE (I’m using WebStorm) and search for
View.propTypes.style
to identify which packages in your dependencies are using it. In my case there was a PR already available for the aws-appsync-react project that was pending. You might have to create your own PR for your particular use case, however it is a pretty easy change.When you are searching, make sure
node_modules
is included in the search. Some IDEs exclude this by default.@Lxxyx yes, in dev it is fine, only crashing for the release build.