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] - Real device - not connected to development server #21480

Closed
franj0 opened this issue Oct 4, 2018 · 14 comments
Closed

[iOS] - Real device - not connected to development server #21480

franj0 opened this issue Oct 4, 2018 · 14 comments
Labels
Bug Platform: iOS iOS applications. Priority: Mid Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@franj0
Copy link

franj0 commented Oct 4, 2018

Environment

React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 1.94 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.1.0 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
**Platforms: iOS 12.0, macOS 10.14 **, tvOS 12.0, watchOS 5.0
Android SDK:
Build Tools: 19.1.0, 20.0.0, 21.1.2, 22.0.1, 23.0.1, 23.0.2, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.3, 28.0.2
API Levels: 23, 24, 25, 26, 27
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5014246
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7

Description

My iPhone(iOS 12) cannot connect to http://localhost:8081/debugger-ui or react-native-debugger, while on simulator everything working fine.

Reproducible Demo

  1. Clean && rebuild && run app from xCode 10
  2. Clean/Build/Run it's OK
  3. App started on iPhone iOS 12
  4. In terminal there is no any changes, just stuck at

Loading dependency graph, done.!

screen shot 2018-10-04 at 4 23 10 pm

I tried:

  • FIX double-conversionerrors, third party errors, libfishhook.a errors, glog-0.3.4 + arch erorrs.
  • Mac and iPhone connected to same wi-fi (pinged OK)
  • Turn ON hotspot on iPhone and connect mac to it/ ping IP from mac was OK but still not connected to development server
  • clear npm cache, reinstall npm modules...
  • some thing disabled in xCode under edit-scheme enviroment
  • Legacy build system
  • New react-native init project - RN 0.57 and run it on iPhone and same issue happend again.

I was looking for a solution for 2-3 days and try everything from stackoverflow + github but still not fixed.

I don't know what to try next? Is anyone have this issues?
Also I don't see point to spam with screenshots, if anyone require I'll post it.
To me this looks like network problem but not solution yet.

Thank you

@DaniyarJakupov
Copy link

Try to load JS via your Mac IP Address. In AppDelegate.m:

jsCodeLocation = [NSURL URLWithString:@"http://YOUR_MAC_IP:8081/index.bundle?platform=ios&dev=true"];

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@franj0
Copy link
Author

franj0 commented Oct 4, 2018

Tried with 0.57 on new simple project, not fixed.
@DaniyarJakupov , forgot to mention that on post, tried earlier, also not fixed

SS:
img_2637

@rajatbeck
Copy link

Facing the same issue here.Any fixes.

@franj0
Copy link
Author

franj0 commented Oct 10, 2018

Anyone, anything?

@DaniyarJakupov
Copy link

Anyone, anything?

just updated my rn version to 0.57.1. This solution still works fine for me:

Try to load JS via your Mac IP Address. In AppDelegate.m:

jsCodeLocation` = [NSURL URLWithString:@"http://YOUR_MAC_IP:8081/index.bundle?platform=ios&dev=true"];

@Monte9
Copy link
Contributor

Monte9 commented Nov 5, 2018

Ran into the same issue when upgrading from react-native: 0.54.6 => 0.57.0

@nayan27
Copy link

nayan27 commented Nov 13, 2018

Having same problem here..

@franj0
Copy link
Author

franj0 commented Nov 13, 2018 via email

@huynhtansi
Copy link

I had same issue. For my case, open Xcode -> Go to Build Phases -> Delete "Bundle React Native code and images" phase (Remember copy script) -> Create new Run Script with same name & paste script -> Clean project & build again.

Reason: Xcode sometimes not run this script (I have no idea), so App cannot find main.bundle. Re-creating will make xocdeproject generate new ID for this script.

@michalchudziak
Copy link
Contributor

I tried to run freshly generated react-native init (0.59.1) app on iPhone X via Xcode. Indeed there is no output in the terminal where the metro is running. However, the app starts, possibly the different instance of metro is being used.

@SudoPlz
Copy link
Contributor

SudoPlz commented May 30, 2019

I quit trying to get that to work,
just

  1. npm install -g localtunnel
  2. lt --port 8081
  3. Copy the url that this command outputs, and place it to your AppDelegate.m like so
    return [NSURL URLWithString:@"https://blue-termites-13.localtunnel.me/index.bundle?platform=ios&dev=true"];

Thank me later.

@stale
Copy link

stale bot commented Aug 28, 2019

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 a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 28, 2019
@stale
Copy link

stale bot commented Sep 4, 2019

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.

@stale stale bot closed this as completed Sep 4, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Priority: Mid Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

10 participants