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.

React Native 0.50.1 - Release Crash

See original GitHub issue

Hi,

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:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
jacargentinacommented, Nov 8, 2017

Same here, doing this to be sure:

  • react-native updated from 0.50.0 (working build published on App Store) to 0.50.3
  • rm -rf node_modules/
  • npm i
  • react-native run-ios --configuration=release
  • app crashes after splash screen is shown
2reactions
mosleimcommented, Oct 2, 2018

this happens again! my package is:

  "dependencies": {
    "@babel/runtime": "^7.1.2",
    "native-base": "^2.8.0",
    "react": "16.5.0",
    "react-native": "0.57.1",
    "react-native-charts-wrapper": "^0.4.8",
    "react-navigation": "^2.17.0"
  },
Read more comments on GitHub >

github_iconTop Results From Across the Web

Release APK crash on start - React Native - Stack Overflow
Got the problem, caused by. View.PropTypes. deprecated on 0.49 should move to import { ViewPropTypes } from 'react-native';.
Read more >
App Center Crashes for React Native - Microsoft Learn
Your React Native app needs to be compiled in release mode for this crash to be sent to App Center. Note. At this...
Read more >
ReactNative App Crashes when Deployed to TestFlight
When I download the app from TestFlight on the same device, the app crashes immediately upon opening the app. The app is built...
Read more >
Fixing React-Native android release build - wesionaryTEAM
Fixing React-Native android release build Android release build crashes on launch but works fine on a development mode. couldn't find DSO to load: ......
Read more >
Crash Reporting - Instabug
This page contains an overview of the information available in the Crash Reporting sections of the Instabug Docs for React Native apps.
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