React Native 0.50.1 - Release Crash
See original GitHub issueHi,
I just upgraded from RN 0.49 to 0.50.1 and have ran into problem when building and running the release version. I trimmed my app back to the simplest version it could be and I narrowed it down to NativeBase.
react-native, react and native-base version
“native-base”: “^2.3.3”, “react”: “^16.0.0”, “react-native”: “^0.50.1”,
Expected behaviour
App does not crash when built for release and ran.
Actual behaviour
App crashes when built and ran in release mode. The following output is shown in the Xcode output:
Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: undefined is not an object (evaluating 'e.length')', reason: 'Unhandled JS Exception: undefined is not an object (evaluating 'e.length'), stack:
<unknown>@340:132
<unknown>@340:196
exports@340:395
<unknown>@338:218
<unknown>@338:72
t@2:620
<unknown>@333:1740
t@2:620
<unknown>@332:131
t@2:620
<unknown>@331:131
t@2:620
<unknown>@330:308
t@2:620
<unknown>@329:216
t@2:620
<unknown>@308:742
t@2:620
<unknown>@13:152
t@2:620
<unknown>@12:30
t@2:620
<unknown>@2:154
global code@631:9
'
*** First throw call stack:
(0x182a27d38 0x181f3c528 0x182a27c80 0x100fd5398 0x100fd305c 0x182a2f6a0 0x18290e820 0x18291322c 0x100fe6058 0x101025d74 0x101025ad4 0x103ffd49c 0x103ffd45c 0x10400c110 0x1040009a4 0x10400d104 0x104014100 0x182652fe0 0x182652c30)
Steps to reproduce (code snippet or screenshot)
This code causes the issue to appear:
import React from 'react';
import {
AppRegistry,
//Text
} from 'react-native';
import {
Text
} from 'native-base';
export default class App extends React.Component {
render() {
return (
<Text>Hello World</Text>
);
}
}
AppRegistry.registerComponent('whereverly_app', () => App);
However if I remove the reference to NativeBase it all seems to work. Working code:
import React from 'react';
import {
AppRegistry,
Text
} from 'react-native';
export default class App extends React.Component {
render() {
return (
<Text>Hello World</Text>
);
}
}
AppRegistry.registerComponent('whereverly_app', () => App);
Screenshot of emulator/device
N/A
Is the bug present in both ios and android or in any one of them?
I am only developing on iOS currently.
Any other additional info which would help us debug the issue quicker.
Sorry I can’t be of more help but the issue only appears in production which makes it tricky to track down. I thought it might be something todo with this: https://github.com/facebook/react-native/issues/16567
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:18 (2 by maintainers)
Top GitHub Comments
Same here, doing this to be sure:
this happens again! my package is: