[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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 Stuck at Boot on Real Devices RN 60.5 #26336

Closed
IAmMarcellus opened this issue Sep 5, 2019 · 5 comments
Closed

[iOS] App Stuck at Boot on Real Devices RN 60.5 #26336

IAmMarcellus opened this issue Sep 5, 2019 · 5 comments
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@IAmMarcellus
Copy link
IAmMarcellus commented Sep 5, 2019

TL;DR: My app gets stuck at the splash screen with no errors when I run on a real device ever since I upgraded to react native 60.5 from 59.5. I even created a new project and copied the necessary files over, but it's still happening. However, it runs on the simulator just fine.

The Problem

When I run my app on a real iOS device from xcode, the app gets stuck on the splash screen and never loads, nor does it crash. If I close the app and then try to open it again, I get a blank white screen (and I've noticed that the packager doesn't even try to load the bundle again, which it should). This happens no matter how many times I try to reopen the app.
If I run the app on a real iOS device, but instead launch it from the command line using "run-ios --device", I can usually get it to work, but I may have to close the app and open it a few times.
Running it on the simulator works as expected for either launch method.

2 things that might be related:

  1. running react-native log-ios doesn't work on real devices either. However, it does work on the simulator.
  2. When running on a real device, the green loading bar at the top of the screen during boot isn't there, which it normally would be.

Info

React Native version: 0.60.4
React Native Info:

System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
Memory: 615.95 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.8.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.10.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 27, 28, 29
Build Tools: 27.0.3, 28.0.3, 29.0.0
System Images: android-27 | Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64
Android NDK: 20.0.5594570
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1

What I've tried

I thought that it might be related to #24023 because they were experiencing differences between launching from Xcode vs run-ios and also dealing with an app stuck at boot, however, my app wasn't crashing after hanging like his was, and I've tried all of the suggestions there and none of them worked.
I've also tried adding additional App Transport Security allowances to the info.plist, but none of those seemed to help either.
And I've tried cleaning every single cache that might possibly be storing any react-native data.

Steps To Reproduce

Update: This bug may be reproducible, but I can't test it. Please see my "update" comment below for details.
Unfortunately, I wasn't unable to reproduce this in a new RN project, which, because I'm using a newly initialized project that I copied old code to, makes me think it might be a cache problem (the current app even uses the same Bundle ID as the old one). However, I'm pretty sure I've cleared every cache possible and it hasn't changed the results. Likewise, the app is working fine on the simulator and was working fine before I updated to 0.60, so I hesitate to think its the old code, but rather an environment issue, but I can't seem to narrow it down any further than that.

I've been beating my head over this issue for over a week and now it's delaying a crucial update for my app, please help!

@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Sep 5, 2019
@IAmMarcellus

This comment has been minimized.

@IAmMarcellus IAmMarcellus changed the title [iOS] App Stuck at Boot on Real Devices [iOS] App Stuck at Boot on Real Devices RN 60.5 Sep 5, 2019
@IAmMarcellus
Copy link
Author
IAmMarcellus commented Sep 5, 2019

Update: I realized what makes the app hang, vs what doesn't. On a real device, that doesn't have the app installed already, running the app from Xcode will make it hang every time, but if I press the stop button in Xcode while its hanging, the app will exit and if I open it again, it seems to work fine. Then, once the app is installed (even if I didn't make it run the first time I installed it), I can clear all the caches and delete all the builds and everything and it will work fine, as long I don't delete the app off of the device itself before building. The only thing strange is that I never see the green loading thing while booting, like I do when running a newly initialized project.
This also means that the problem might be reproducible because when running a newly initiated problem to test my problem, the app closes after building and xcode stops running because I have to verify that its a trusted app, so I can't test if it hangs on the initial boot, which is really the problem here.
So, I definitely think there is a bug, either in my environment or in react native, but is this a bug with the packager that's just causing it to hang on the first boot when launching from my local machine or would this continue to be a problem after release? Or rather, if I can archive this build without any error, is it safe to submit this build with these errors?

@IAmMarcellus
Copy link
Author
IAmMarcellus commented Sep 5, 2019

I had shared the console messages that show when the app crashes in debug mode, but I don't think there was anything valuable in them so I hid the comment. However, these are the messages that show up in the console during release mode when its hanging after the packager has finished loading the bundle and I think they might actually be more informative:

019-09-05 01:42:48.141719-0400 Pulse[2230:1443246] void SendDelegateMessage(NSInvocation *): delegate (webView:connectionPropertiesForResource:dataSource:) failed to return after waiting 10.000000 seconds. main run loop mode: kCFRunLoopDefaultMode
2019-09-05 01:42:51.076041-0400 Pulse[2230:1443191] [BoringSSL] nw_protocol_boringssl_input_finished(1543) [C12.1:2][0x10f110470] Peer disconnected during the middle of a handshake. Sending errSSLClosedNoNotify(-9816) alert
2019-09-05 01:42:51.090792-0400 Pulse[2230:1443191] TIC TCP Conn Failed [12:0x280e79f80]: 3:-9816 Err(-9816)
2019-09-05 01:42:51.092419-0400 Pulse[2230:1443191] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9816)
2019-09-05 01:42:51.092501-0400 Pulse[2230:1443191] Task <55AF8C23-3355-451C-913F-3BF881EC0E0A>.<1> HTTP load failed (error code: -1200 [3:-9816])
2019-09-05 01:42:51.093397-0400 Pulse[2230:1443191] Task <55AF8C23-3355-451C-913F-3BF881EC0E0A>.<1> finished with error - code: -1200
2019-09-05 01:42:58.143142-0400 Pulse[2230:1443246] void SendDelegateMessage(NSInvocation *): delegate (webView:connectionPropertiesForResource:dataSource:) failed to return after waiting 10.000000 seconds. main run loop mode: kCFRunLoopDefaultMode
2019-09-05 01:43:08.144568-0400 Pulse[2230:1443246] void SendDelegateMessage(NSInvocation *): delegate (webView:connectionPropertiesForResource:dataSource:) failed to return after waiting 10.000000 seconds. main run loop mode: kCFRunLoopDefaultMode
2019-09-05 01:43:18.145968-0400 Pulse[2230:1443246] void SendDelegateMessage(NSInvocation *): delegate (webView:connectionPropertiesForResource:dataSource:) failed to return after waiting 10.000000 seconds. main run loop mode: kCFRunLoopDefaultMode
2019-09-05 01:43:28.147356-0400 Pulse[2230:1443246] void SendDelegateMessage(NSInvocation *): delegate (webView:connectionPropertiesForResource:dataSource:) failed to return after waiting 10.000000 seconds. main run loop mode: kCFRunLoopDefaultMode
2019-09-05 01:43:38.148897-0400 Pulse[2230:1443246] void SendDelegateMessage(NSInvocation *): delegate (webView:connectionPropertiesForResource:dataSource:) failed to return after waiting 10.000000 seconds. main run loop mode: kCFRunLoopDefaultMode
2019-09-05 01:43:48.150332-0400 Pulse[2230:1443246] void SendDelegateMessage(NSInvocation *): delegate (webView:connectionPropertiesForResource:dataSource:) failed to return after waiting 10.000000 seconds. main run loop mode: kCFRunLoopDefaultMode

@IAmMarcellus
Copy link
Author

This issue has to do with using modals and alerts at the same time on iOS. It is definitely a bug and something similar has been mentioned here: #10471. Since this issue doesn't relate to the actual problem (and since I solved my issue by changing the logic of my code), I'm going to close this. However, the bug definitely still exists.

@vantb9x
Copy link
vantb9x commented Oct 1, 2019

This issue has to do with using modals and alerts at the same time on iOS. It is definitely a bug and something similar has been mentioned here: #10471. Since this issue doesn't relate to the actual problem (and since I solved my issue by changing the logic of my code), I'm going to close this. However, the bug definitely still exists.

Thank you so much. It works for me

@facebook facebook locked as resolved and limited conversation to collaborators Oct 4, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants