-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
App instantly crashes in v0.53.3 on iOS due to a low-level RedBox error #18090
Comments
Update: so it would seem this issue is happening for all errors, even when I manually throw errors. My index.js looks like this: const EntryPoint = props => {
throw new Error("This is an error");
return null;
};
AppRegistry.registerComponent('MyApp', () => EntryPoint); And throwing the error causes my app to immediately crash with the same ObjC error. Removing the error just causes a white page, as expected. I headed on over to the Expo Snack site to try to replicate the issue, but the highest RN version Expo supports right now is v0.52, so I couldn't test on the latest version. This issue doesn't seem to be present in v0.52. Hopefully this helps. It's looking like it might be a RN library issue, or at the very least some XCode incompatibility wonkiness. |
Update #2: Running via XCode prevents the app from crashing. Not sure why. It only seems to crash when I run via |
After running in XCode, the CLI run command seems to be working again. Closing for now. Will re-open if issue arises again. |
So the issue seems to be tied to running the app on the iPhone 6, the default when running from the command-line. In XCode, it was defaulting to iPhone 8, which runs the app just fine. However, running an iPhone 6 sim from XCode still causes the app to crash, with the same error message. |
I can confirm this on iphone 5 as well, running RN 54. And similar to Nick, it does work on iPhone 8. I get the exact same stack trace inside Xcode on any JS exception. |
I believe this is actually an iOS 8 issue, |
I'm experiencing the same issue -[UITableView heightAnchor]: unrecognized selector sent to instance 0x15099600 Ran from Xcode (not the command-line) on iOS 8.1.2, iPhone 5 |
find this define |
Just comment out these lines in RCTRedBoxExtraDataViewController.m: //CGFloat tableHeight = self.view.bounds.size.height - 60.f; //CGFloat buttonWidth = self.view.bounds.size.width / 4; I tried debugging and the _tableView, dismissButton and reloadButton objects don't have heightAnchor or widthAnchor values. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS High Sierra 10.13.3
Node: 9.5.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.3 => 0.53.3
Steps to Reproduce
I'm not entirely sure, as there's a chance it might have to do with XCode, Objective-C, or something else low-level. After upgrading to v0.53.3, my app instantly crashes the minute it loads. I removed my
ios
directory, ejected the project and re-linked all my dependencies and received the same error. Runningreact-native log-ios
outputs an Objective-C runtime error that I'm not quite sure how to interpret (see below).Expected Behavior
I imagined there would be some RedBox errors after upgrading, but the app now crashes before it can even display those errors due to a runtime issue.
Actual Behavior
The app crashes. Running
react-native log-ios
I see the following output:Checking RCTRedBoxExtraDataViewController.m, I saw the "heightAnchor" calls the error is referencing. That said, I'm not exactly sure how to approach this issue or why it might be happening in the first place. If I had any clue what kind of RedBox error it might be trying to throw or what is causing that error I'd have a better shot of replicating it, but right now I'm rather in the dark.
Any idea what could trip up the RedBox system like that? Is there another way to view what error it's trying to throw so I can at least better understand why the error is causing the app to crash? Any help is appreciated. Thanks.
The text was updated successfully, but these errors were encountered: