Repository navigation
[Android]Release crash "s.propTypes.style" #5655
Copy link
Copy link
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
02-01 13:16:40.650 12399-12424/? E/ReactNativeJS: undefined is not an object (evaluating 's.propTypes.style')
02-01 13:16:40.670 12399-12425/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.reading, PID: 12399
com.facebook.react.modules.core.JavascriptException: <unknown>
index.android.bundle:18:31918
r
index.android.bundle:1:575
n
index.android.bundle:1:241
<unknown>
index.android.bundle:18:16832
r
index.android.bundle:1:575
n
index.android.bundle:1:241
<unknown>
index.android.bundle:18:15861
r
index.android.bundle:1:575
n
index.android.bundle:1:241
<unknown>
index.android.bundle:18:14713
r
index.android.bundle:1:575
n
index.android.bundle:1:241
<unknown>
index.android.bundle:18:13643
r
index.android.bundle:1:575
n
index.android.bundle:1:241
<unknown>
index.android.bundle:17:26122
r
index.android.bundle:1:575
n
index.android.bundle:1:241
<unknown>
index.android.bundle:1:11742
r
index.android.bundle:1:575
r
index.android.bundle:1:304
n
index.android.bundle:1:241
<unknown>
global code@index.android.bundle:19:25326
02-01 13:16:40.730 12399-12424/? E/ReactNativeJS: Module AppRegistry is not a registered callable module.
I found s.propTypes.style in index.android.bundle here:
g=o.createClass({displayName:"ScrollableTabView",statics:{DefaultTabBar:f},propTypes:{tabBarPosition:d.oneOf(["top","bottom"]),initialPage:d.number,page:d.number,onChangeTab:d.func,onScroll:d.func,renderTabBar:d.any,style:s.propTypes.style}
but debug is right, release crash.
why?
react-native version: 0.19.0
used: react-native-scrollable-tab-view
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Activity
facebook-github-bot commentedon Feb 1, 2016
Hey Richard-Cao, thanks for reporting this issue!
React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
react-nativeor for more real time interactions, ask on Discord in the #react-native channel.Richard-Cao commentedon Feb 1, 2016
please help……
Richard-Cao commentedon Feb 1, 2016
I remove
react-native-scrollable-tab-viewand release apk but still crash, it report another crash withundefined is not an object (evaluating 'u.propTypes.style')whatever, I think this is react-native 0.19.0's bug, when release apk
Richard-Cao commentedon Feb 1, 2016
I go back to 0.18.0, not crash.
This is 0.19.0 bug for Android release!
AntiHate commentedon Feb 1, 2016
+1
RN: 0.19.0
App crashes on release build, debug release works fine.
It works on RN 0.18.1
AntiHate commentedon Feb 1, 2016
I manage to fix it by setting proguard to false in release build.
@Richard-Cao to fix it make this change in you app build.gradle
janicduplessis commentedon Feb 1, 2016
I can confirm I have the same issue too. Like @AntiHate said disabling proguard is a workaround.
kristjanmik commentedon Feb 1, 2016
@janicduplessis It is not a workaround since you would never publish an app without running it through some obfuscation
janicduplessis commentedon Feb 1, 2016
@kristjanmik As a temporary workaround is what I meant.
Richard-Cao commentedon Feb 2, 2016
I think if publish app, should
def enableProguardInReleaseBuilds = truedanleveille commentedon Feb 2, 2016
👍 +1
Had to use the proguard workaround.
mhagmajer commentedon Feb 2, 2016
+1
janicduplessis commentedon Feb 3, 2016
I found the problem, ReactProp and ReactPropGroup were moved to the annotations package and the proguard file was not updated accordingly.
To fix it you can change
for
in your proguard-rules.pro line 45-46
I'll submit a PR to fix the templates.
kristjanmik commentedon Feb 3, 2016
Awesome @janicduplessis, it solved the props problem. Are you running into this problem as well with a fresh project + minification + proguard with -dontobfuscate commented out. Here is a dump:
janicduplessis commentedon Feb 3, 2016
@kristjanmik I never tried without -dontobfuscate. My guess it's that it is not supported at the moment, maybe @mkonicek or @bestander could help you with that.
Richard-Cao commentedon Feb 4, 2016
Awesome!! @janicduplessis
Fix proguard template for ReactProp and ReactPropGroup
cosmith commentedon Feb 9, 2016
Thanks @janicduplessis, this was driving me crazy... what I don't understand is why my
import com.facebook.react.uimanager.ReactProp;was not failing at compile time.MikeOrtiz commentedon Jun 16, 2016
@kristjanmik I am running into exactly your same error. Did you ever find a solution?
@mkonicek Is it true what @janicduplessis suggested that
-dontobfuscateis not supported? This would be a major showstopper for us as code obfuscation is a requirement. We cannot publish without it.MikeOrtiz commentedon Jun 17, 2016
@kristjanmik I was able to get past that error by adding the following proguard rule:
-keep class com.facebook.** { *; }You can refer to this StackOverflow question for more info.
deific commentedon Nov 10, 2017
it is very strange,my App crashes on release build in RN 0.49, debug release 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 ; }
robisaks commentedon 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