Skip to content
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

iOS App Crash on Application update on install in React-Native 0.49.3 #1064

Closed
ujwal-setlur opened this issue Oct 27, 2017 · 1 comment
Closed

Comments

@ujwal-setlur
Copy link

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Steps to Reproduce

  1. Use react-native 0.49.3
  2. Set up application for code-push
  3. Build app and load on iPhone
  4. App launches and says there is an update. I say OK, and the app crashes. Subsequent launches of the app are fine since it does not give me the dialog of an update available.
  5. If I don't use Code Push, it works fine.
  6. The error seems to be related to View.PropTypes.style which is a change in React 16, but I can't see any modules that are still using that. I am am using all upgraded modules.

Here is how I am invoking code push in my code:

export default codePush({
  updateDialog: true,
  checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
  installMode: codePush.InstallMode.IMMEDIATE
})(MyApp);

Expected Behavior

App should not crash

Actual Behavior

App crashes.

[CodePush] Loading JS bundle from file:///var/mobile/Containers/Data/Application/2B721F1D-708F-491C-9D35-7FC1646E220A/Library/Application%20Support/CodePush/0759428769967ead053abfef946a4feba4ef643950b3ac48241fb6f85186f3aa/CodePush/main.jsbundle
2017-10-26 19:11:32.381 [error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating 'p.View.propTypes.style')
2017-10-26 19:11:32.381461-0700 GrubMobile[3028:978637] undefined is not an object (evaluating 'p.View.propTypes.style')
2017-10-26 19:11:32.383 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating 'p.View.propTypes.style')
2017-10-26 19:11:32.383028-0700 GrubMobile[3028:978590] Unhandled JS Exception: undefined is not an object (evaluating 'p.View.propTypes.style')
2017-10-26 19:11:32.384283-0700 GrubMobile[3028:978590] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: undefined is not an object (evaluating 'p.View.propTypes.style')', reason: 'Unhandled JS Exception: undefined is not an object (evaluating 'p.View.prop..., stack:
<unknown>@1156:2042
i@2:553
<unknown>@1148:295
i@2:553
<unknown>@1103:187
i@2:553
<unknown>@1102:79
i@2:553
<unknown>@1101:189
i@2:553
<unknown>@1099:412
i@2:553
<unknown>@1098:112
i@2:553
<unknown>@688:537
i@2:553
<unknown>@473:283
i@2:553
<unknown>@305:304
i@2:553
<unknown>@12:51
i@2:553
n@2:266
global code@1320:9
'
*** First throw call stack:
(0x180c87d38 0x18019c528 0x180c87c80 0x104e639d8 0x104e6169c 0x180c8f6a0 0x180b6e820 0x180b7322c 0x104e744c0 0x104eb35a4 0x104eb3410 0x1057f549c 0x1057f545c 0x105804110 0x1057f89a4 0x105805104 0x10580c100 0x1808b2fe0 0x1808b2c30)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Reproducible Demo

Don't have a reproducible demo.

Environment

  • react-native-code-push version: 5.1.3-beta
  • react-native version: 0.49.3
  • iOS/Android/Windows version: iOS 11.03
  • Does this reproduce on a debug build or release build? Release build
  • Does this reproduce on a simulator, or only on a physical device? Physical device iPhone 7
@ujwal-setlur
Copy link
Author

OK, I am the doofus here. A light bulb finally went off in my head making me think maybe, just maybe that the update I had pushed to the code-push server was buggy and was causing the crash. And indeed it was! I had pushed the update yesterday before I had chased down all the prop-types issues in the third party modules I was using (my own code was clean :).

Anyway, I pushed a new update, and everything works just fine! Sorry for not thinking straight before I opened this bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant