Failing to connect to Metro on iOS 14 and Big Sur

See original GitHub issue

Description

My RN app sometimes decides to connect to Metro, sometimes not and still works (but with incredibly long load times), and sometimes it just crashes - it’s totally random. Same when using react-native run ios --device and Xcode (it’s definitely in the Debug scheme). I suspect it has something to do with iOS 14 permissioning - when it does work, it happens after clicking Allow to accessing other network devices and force quit/opening the app. I’ve looked through console logs and am not closer to figuring out why this is happening.

Running iOS 14.0.1, macOS 11 beta 8 (20A5374i).

React Native version:

For some reason react-native isn’t recognising my local settings, so also attached an excerpt of my package.json.

  "dependencies": {
    "react": "16.13.1",
    "react-native": "0.63.3",
  },
System:
    OS: macOS 11.0
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 741.13 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.18.1 - ~/.nvm/versions/node/v12.18.1/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v12.18.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2, 29.0.3
      System Images: android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 12.0/12A7209 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_251 - /Users/lucas/.jenv/shims/javac
    Python: 3.8.5 - /usr/local/opt/python/libexec/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: Not Found
    react-native: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Again, this is hard to do as it’s a random occurrence.

Expected Results

The app not to crash.

Snack, code example, screenshot, or link to a repository:

Again, this is hard to do as it’s a random occurrence.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:10

github_iconTop GitHub Comments

4reactions
rikurcommented, Jul 15, 2021

I was stuck for hours, failing to load anything from the packager. What fixed it for me was:

sudo sysctl -w kern.maxfiles=10485760
sudo sysctl -w kern.maxfilesperproc=1048576

found at https://facebook.github.io/watchman/docs/install.html

Kindly note that there are instructions on how to persist the settings over reboots on the same link.

3reactions
yoavapicommented, Dec 15, 2020

Any update on this with Big Sur 11.1?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Native IOS real device does not connect to Metro server
Have the same problems. These are my steps to 'fix' this: Ensure that you don't have ethernet internet cable plugged in.
Read more >
Configuring L2TP VPN servers to work with iOS 14 and ...
To make sure that VPN client devices running iOS 14 and macOS Big Sur can connect to your L2TP VPN server, configure the...
Read more >
Hack imac to use as monitor - cosmeticaiaconisi.it
With AirServer enabled on your big screen, users can use their own devices such as a Mac or PC, iPhone, iPad, Android, Nexus...
Read more >
Release Notes for Cisco AnyConnect Secure Mobility Client ...
Refer to AnyConnect macOS 11 Big Sur Advisory for AnyConnect changes ... Cisco supports AnyConnect VPN access to IOS Release 15.1(2)T ...
Read more >
Apple iOS 15.6.1: Urgent iPhone Update Suddenly ... - Forbes
MORE FROM FORBESApple Could Release iPhone 14 And iPhone 14 Pro Sooner Than ... specifically those running macOS Big Sur and macOS Catalina....
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