-
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
Release build crashes on iOS and Android. Fatal Exeption. #16567
Comments
This is clearly showing that some package is still using View.propTypes. I was running into this too until I did find the offending packages. Please do the following:
The first step removes all the map files so that your grep output is not flooded. You will need to reinstall node_modules later so that you get them back. Please check thoroughly the output of the second. You can either post output here or send them to me privately. I just went through the pain myself and would like to help you. |
Did you check just your dependencies or the sub-dependencies of your dependencies? |
I checked only my dependencies. I ran the commands you mentioned, and the second one printed a bunch of lines. And seems like These are the packages listed: Thank you very much for helping out 😄 |
No worries. You have to check the entire dependency tree for
All three are illegal in React 16. The fixes for those are respectively:
My approach was this. Check each of those projects on GitHub and see:
I had to do all three :). The tricky part was when the direct dependency was clean, but a sub-dependency was not. I then had to fork both the direct dependency and its sub-dependency, fix the issue in the sub-dependency fork, change the my fork of the main dependency to use my fork of the sub-dependency. As you can see, a bloody pain in the proverbial backside! But once I figured out the problem, it took me just a few hours to hit them all. Good luck! |
hahaha.. I can only imagine what you went through. Thanks a lot again for saving so many hours mine 😄 |
For anyone using code-push and running into app crashes on launch, see this: |
I'm downgrade to RN 0.45.1 to solve this. |
I downgraded to RN 0.48.4 for now. |
In my case, upgrading react-native-admob 1.3.2 to 2.0.0-beta.2 solved situation. |
undefined is not an object (evaluating 'a.propTypes.style') This is the error I get. I used grep -R 'a.propTypes.style' node_modules and it doesn't even find an instance where this code is executed... I'm confused. |
Don't include the 'a'. Please grep for propStyles.style? Is it attached to a View object? In my experience, it is one of the following:
Please check thoroughly for all three. |
Also check your own code |
@ujwal-setlur My grep for 'View.propTypes' outputs a lot of examples like style: ViewPropTypes ? ViewPropTypes.style : View.propTypes.style. Did you have to remove those too? |
No those are fine. Those are packages that are trying to be backwards compatible. They first check for ViewPropStyles and then for View.propStyles if ViewPropStyles is essentially null or undefined |
Those are the only instances where View.propTypes are being used. Nothing else... Strange. |
@hironarita did you check your code first? If so, good. Unfortunately, you need to check the node_modules code minutely. Please also check for just propStyles.style. Yes, this is a bloody pain. If you want you, you can send the output to me and I am happy to double-check for you |
@hironarita, can you list your dependencies and devDependencies from your package.json? |
@ujwal-setlur I checked my own code and there's no instances of View.propTypes. Here's the output: node_modules/@ptomasroos/react-native-multi-slider/DefaultMarker.js:const ViewPropTypes = require('react-native').ViewPropTypes || View.propTypes; |
"dependencies": { |
Ok, I will check these in the morning. |
Thank you so much. |
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. Run
|
modify
|
@ujwal-setlur you are right .I have solued it. I spent too much time for this problem due to another no updated module, it's too painful , thanks so much |
@ujwal-setlur Thank you very much! I change
to:
and everything go well. |
glad my pain made yours' shorter :-) |
@ujwal-setlur The same code RN0.49.5 Android Release is ok,but when i update from RN0.49.5 to RN0.50.1 Android Release crash again!Any suggestion? |
I haven't moved to 0.50 yet. Will look at it today. |
thanks, but is there any way to work around. let say, I use a lot of lib in my project it's very hard to fix all of them. :( and why this problem only happened in release version? |
How I solved this:
|
I think I don't have any dependencies using View.PropTypes but still release variant crashes. Here is my output of the grep. node_modules/react-native/Libraries/Lists/ListView/ListView.js: ...ScrollView.propTypes, Any help would be appreciated. Thanks. Update: Jan 8 2017. Downgrading to RN 0.45.1 and React 16.0.0-alpha.8 solved the issue for me. |
I had to update my dependencies to utilize the new |
Curios about it too, since had the same problem |
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version? I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer. |
Still facing this issue in V. 0.53.3. |
I'm also having this problem on v0.53.3, but I cannot pin point the culprit library |
XXXX:ReactWork $ grep -R "View.propTypes" node_modules iOS & Android release build crashes on application launch. Log |
after three days fighting with this issue I use the solution of @dhanushuUzumaki |
I followed the steps to transverse dependencies and sub dependencies. I discovered |
react-native-multi-slider was the cause for me with [email protected] |
why this closes? have someone have a solution for this problem? here:
still crash on iOS or on Android. |
i am getting same issue when i have create the release build and install in real device please help me --------- beginning of crash
|
Same for me. The error is so cryptic, its difficult to find what the issue is. This is only a problem in Android and not iOS.
|
I'm facing the same issue. Please help.
|
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 8.4.0
Yarn: Not Found
npm: 5.4.1
Watchman: 4.9.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: ^0.49.3 => 0.49.3
Target Platform: iOS (8.0) Android (26)
Steps to Reproduce
sudo react-native run-android --variant=release
.package.json
file:Expected Behavior
Application should run on the device without any crashes (in release mode).
Actual Behavior
Application builds successfully and deploys onto device. Then the app crashes once it opens.
Screen shots are not available since the app crashes and closes, or is just a blank screen.
Reproducible Demo
Unable to create a reproducible demo.
The text was updated successfully, but these errors were encountered: