question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android]Release crash "o.propTypes.style" in RN 0.49

See original GitHub issue

#5655 this issues has same problem in Rn 0.19.0,and find a solution. but it is very strange,my app crashes on release build in RN 0.49, debug works fine. I check proguard-rules.pro file lin 45-46:

`

-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } -keep class * extends com.facebook.react.bridge.NativeModule { *; } -keepclassmembers,includedescriptorclasses class * { native ; } -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; }

`

android:7.1 rn:0.49 package.json:

{ "name": "AirporRn", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "antd-mobile": "^2.0.0", "jwt-decode": "^2.2.0", "moment": "^2.19.1", "object-assign": "^4.1.1", "prop-types": "^15.6.0", "rc-form": "^1.4.8", "react": "16.0.0-beta.5", "react-dom": "^16.0.0", "react-native": "0.49.3", "react-native-scrollable-tab-view": "^0.8.0", "react-native-storage": "^0.2.2", "react-navigation": "^1.0.0-beta.15" }, "devDependencies": { "babel-jest": "21.2.0", "babel-plugin-import": "^1.6.2", "babel-preset-react-native": "4.0.0", "jest": "21.2.1", "react-test-renderer": "16.0.0-beta.5" }, "jest": { "preset": "react-native" } } error log: ` com.facebook.react.common.JavascriptException: undefined is not an object (evaluating ‘o.View.propTypes.style’), stack: <unknown>@493:850 i@2:565 n@2:348 t@2:210 <unknown>@491:299 i@2:565 n@2:348 t@2:210 <unknown>@490:135 i@2:565 n@2:348 t@2:210 <unknown>@488:282 i@2:565 n@2:348 t@2:210 <unknown>@12:315 i@2:565 n@2:278 t@2:210 global code@668:9

at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:56)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:40)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:363)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:163)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
at java.lang.Thread.run(Thread.java:760)

`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
FreddieODcommented, Nov 14, 2017

Im having the same issue. Did you find a solution? I am looking at the ListView.propTypes.style and the such. These have been moved.

0reactions
robisakscommented, Nov 29, 2017

I had the same problem, it ended up being an outdated module I was including.

https://github.com/d-a-n/react-native-modal-picker

I switched to an updated fork, and it worked

https://github.com/peacechen/react-native-modal-selector

Read more comments on GitHub >

github_iconTop Results From Across the Web

gradle - React Native App Debug mode works fine, Release ...
This will resolve updating proptypes for your source code and any node modules. ... the app would work in debug mode, but crash...
Read more >
typeerror: undefined is not an object (evaluating '_reactnative ...
I solved this by,. Commenting itemTextStyle: Text.propTypes.style in ..\node_modules\react-native-material-dropdown\src\components\dropdown file.
Read more >
Typechecking With PropTypes - React
PropTypes exports a range of validators that can be used to make sure the data you receive is valid. In this example, we're...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found