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.

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

See original GitHub issue

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® Core™ 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 https://github.com/facebook/react-native/issues/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!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
IAmMarcelluscommented, Sep 12, 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: https://github.com/facebook/react-native/issues/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.

0reactions
vantb9xcommented, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

If an app on your iPhone or iPad stops responding, closes ...
Force the app to close. Then open the app to see if it works as expected. Restart your device. Restart your iPhone or...
Read more >
React native app stuck on splash screen on device but works ...
For me when I build, it was working fine in simulator however, in actual device only splash screen was coming and nothing else....
Read more >
Move to iOS Stuck on Preparing for a Long Time on iPhone 14 ...
1. Restart both of Your Devices · 2. Turn on Airplane Mode on Android Phone · 3. Turn off All Running Apps on...
Read more >
iPhone Stuck on the Apple Logo? 8 Ways to Troubleshoot
Simply make sure your iPhone is sufficiently charged: Plug the phone into a charger and leave it there for an hour or two...
Read more >
Troubleshoot managed iOS devices for users - Google Support
Device doesn't sync. First, ask the user to get their device and go to Settings and then Google Device Policy and make sure...
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