You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
App crash in release mode when using 'View.propTypes.style' #16542
We have run into this issue as well - runs fine in Debug, crashes in Release.
That's not how things are supposed to work!
Reacted by Jayasagar Jagirapu, David C, timurkhab, Casu, Nicholas Thompson, elquimista, Ilya Iksent, Vladimir Vovk, Oboo Cheng, Joe Esposito and 10 more
This is because of the Reactoron, which is not available at release mode.
Install the plugin which will remove the Reactoron and its calls at time of creating release build.
Follow the instruction. (Not sure if it will work for others who are not using Ignite) Ignite-Ignore-Reactotron
Hope this will help.
@arunjkumarp : I searched for View.propTypes.style in my project and removed at all the places I found it (I found only one)! By removed I mean commenting out or deleting that line.
Hi, I just run across this issue after building my Expo app and submitted to Testflight and tested it on my real device to find out something wrong.
I don't think this issue should be closed. This issue is just so crazy. I did not expect react-native to ever do any subtle thing that can break almost all existing apps instantly.
Seven Sins
You can only discover it in production mode.
View.propTypes exists in many many packages, and libraries are very likely to suppress their warnings.
This does not bring much benefit, if any.
Libraries may have breaking changes upon updates, so you expect everyone updates all the libraries just to upgrade a version of react-native?
Some old libraries, that are out of maintenence but usable, are all ruined by this change.
You cannot simply replace it with new code. You need to use something like ViewPropTypes ? ViewPropTypes.style : View.propTypes.style.
Oh my god, this issue is just so crazy. Mind=Blown.
Reacted by Kristy, Tyler Stanish, Theo Patt, James Zhang, Yoav Nino, Jo JungLae, DanDatefit, Nam Ung Kim, Joshua Pinter, Mike TJ and 7 more
@DanDatefit I search for "View.propTypes.style" in my node_modules/ (with sublime) and identify which packages are crashing. I basically updated them and it is working now (thankfully).
If you have some packages that did not update for this because of out of maintainence, I guess you should:
Fork it
Edit it
In your package.json, change the dependency of that package to pointing to your forked repo
DO NOT directly modify node_modules.
Reacted by Joshua Pinter, Mike TJ and Sumant Bagade
@carsonwah figured I'd need to fork it like you mentioned, most people are just editing the node_modules folder and calling it a day and I'm like wait whaaaatttt. Thanks for responding, luckily most packages have updated and there's only a few culprits that need utensiled.
Couldn't we just create a backwards combat library that just polyfills View.popTypes.style..?
I am having the same issue when i replace View.propTypes.style with ViewPropTypes.style it worked fine but when i again compile my app by command "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res" it again start giving the same error
@ide@carsonwah@sytolk@joshuapinter In my app there is no View.propTypes.style but coming the same error. for more details please check my question from this link Thanks.
Activity
ide commentedon Oct 26, 2017
View.propTypes.style isn't valid and printed a deprecation message for several releases before it was removed. Use ViewPropTypes.style instead.
sytolk commentedon Nov 23, 2017
@ide why View.propTypes.style working in develop build ?
jorgedominguezdev commentedon Nov 30, 2017
We have found the same issue. It only crashes in release mode, but if we are running the packager locally and using debug mode it works
travis-little commentedon Dec 13, 2017
We have run into this issue as well - runs fine in Debug, crashes in Release.
That's not how things are supposed to work!
ghoshabhi commentedon Jan 22, 2018
Removing
View.propTypes.styleworks!Noirdata commentedon Jan 26, 2018
underfined is not an object(evaluating '_reactNative.View.propType.style'
in hashAssetFiles:127
someone know about that?
bamne123 commentedon Feb 3, 2018
This is because of the Reactoron, which is not available at release mode.
Install the plugin which will remove the Reactoron and its calls at time of creating release build.
Follow the instruction. (Not sure if it will work for others who are not using Ignite)
Ignite-Ignore-Reactotron
Hope this will help.
arunjkumarp commentedon Feb 22, 2018
@ghoshabhi How you remove View.propTypes.style.
My project is working in simulator but not in real device.
How i find which library have issue.
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"axios": "^0.17.1",
"react": "16.0.0-beta.5",
"react-native": "0.49.3",
"react-native-collapsible": "^0.9.0",
"react-native-country-picker-modal": "^0.5.1",
"react-native-dash": "0.0.7",
"react-native-datepicker": "^1.6.0",
"react-native-elements": "^0.17.0",
"react-native-form-validator": "^0.2.0",
"react-native-modal-dropdown": "^0.5.0",
"react-native-router-flux": "^4.0.0-beta.28",
"react-native-vector-icons": "^4.4.2",
"react-navigation": "^1.0.0-beta.13",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-persist": "^5.5.0",
"redux-thunk": "^2.2.0",
"rm": "^0.1.8",
"validate.js": "^0.12.0"
},
"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"
},
ghoshabhi commentedon Feb 23, 2018
@arunjkumarp : I searched for
View.propTypes.stylein my project and removed at all the places I found it (I found only one)! By removed I mean commenting out or deleting that line.bamne123 commentedon Feb 23, 2018
@ghoshabhi
Follow steps on following page.
https://github.com/infinitered/babel-plugin-ignite-ignore-reactotron
Remove style: ViewPropTypes.style
carsonwah commentedon May 2, 2018
Hi, I just run across this issue after building my Expo app and submitted to Testflight and tested it on my real device to find out something wrong.
I don't think this issue should be closed. This issue is just so crazy. I did not expect react-native to ever do any subtle thing that can break almost all existing apps instantly.
Seven Sins
View.propTypesexists in many many packages, and libraries are very likely to suppress their warnings.ViewPropTypes ? ViewPropTypes.style : View.propTypes.style.DanDatefit commentedon May 24, 2018
@carsonwah I have the same views... what did you do to get around the issue being in other packages?
carsonwah commentedon May 25, 2018
@DanDatefit I search for "View.propTypes.style" in my
node_modules/(with sublime) and identify which packages are crashing. I basically updated them and it is working now (thankfully).If you have some packages that did not update for this because of out of maintainence, I guess you should:
package.json, change the dependency of that package to pointing to your forked repoDO NOT directly modify
node_modules.DanDatefit commentedon May 25, 2018
@carsonwah figured I'd need to fork it like you mentioned, most people are just editing the node_modules folder and calling it a day and I'm like wait whaaaatttt. Thanks for responding, luckily most packages have updated and there's only a few culprits that need utensiled.
Couldn't we just create a backwards combat library that just polyfills View.popTypes.style..?
fix(carousel): Animated.View.propTypes will cause crash in release mode
joshuapinter commentedon Jun 18, 2018
A little tip for anybody trying to find what dependencies they have that are using
View.propTypes.style. You can run this in your project directory:Options
-oOnly outputs the matching text (for a clean output).-nShows the line number the matching text is on.-rRecursively checks the directory and subdirectories.Example Output
That will help you establish which dependencies you need to update in order to update to React Native 0.49+
Replace `View.propTypes.style` with `ViewPropTypes.style`.
Melanie918 commentedon Aug 9, 2018
I have found that situation react native 0.55.4.
So I have replaced
View.propTypes.stylewithViewPropTypes.style.Then it works well in release mode.
MishraUdit commentedon Aug 24, 2018
I have tried the above methods however none of them is solving my issue:

this is my index.js file:
ankita1427 commentedon Aug 31, 2018
I am having the same issue when i replace View.propTypes.style with ViewPropTypes.style it worked fine but when i again compile my app by command "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res" it again start giving the same error
ankita1427 commentedon Aug 31, 2018
plz help asap i am working on window with ver-0.55.4
vvkaghera commentedon Sep 17, 2018
@ide @carsonwah @sytolk @joshuapinter In my app there is no
View.propTypes.stylebut coming the same error. for more details please check my question from this link Thanks.