-
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
Regression: Cannot connect to packager via IP or physical ios devices #24002
Comments
Experiencing this on Android as well. Attempted to debug with my 192.168.x.x and 8081 port. Experiencing "Could not connect to development server." on both a fresh react-native init project along with a project upgraded from 0.58.6.
|
Experiencing the same issue here.
|
You just need to add a new line with your device ip into android/app/src/debug/res/xml/react_native_config.xml Like this : <?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">localhost</domain>
<domain includeSubdomains="false">10.0.2.2</domain>
<domain includeSubdomains="false">10.0.3.2</domain>
<domain includeSubdomains="false">192.168.1.38</domain>
</domain-config>
</network-security-config>` |
Closing since it's not an issue. We need to update documentation here: https://facebook.github.io/react-native/docs/running-on-device#docsNav with the steps on how to troubleshoot this issue if it happens (and it will happen, since it's super common to run on a different IP). |
Would be awesome if anyone of you would like to send a PR - I would be more than happy to help :) |
Hi @grabbou Thanks for getting back on this. For interests sake, did you try to reproduce this issue? I do believe it's an issue and was unrightfully closed. This is functionality that works perfectly fine on So I don't think this is due to running on different IP ranges, plainly because it works fine when running on a previous version of RN. Also as stated in the OP, in RN 0.59 you can not even navigate to the debugger-ui using the machine hosting the packager using its IP, but you can in RN 0.58.6. |
Oh snap! I’ve read this was Android issue (which we have fixed yesterday locally by updating the XML as suggested). I have no problems running iOS on a device - but going to double check. |
Thanks! I did also double check on my side this morning before I replied! Let me know what you find |
@FrikkieSnyman @grabbou I'm also having this issue, I thing it is related to the metro bundler. I've seen that after updating my project to RN 0.59 there is a new file |
@grabbou I got this working by adding I didn't have time to figure out why this used to work prior to 0.59, but it seems that it is probably related with |
I'm running into the same issue. I can consistently reproduce this issue if I create a new project via |
I've also tried everything suggested here and elsewhere but am unable to get any iOS/Android simulator/emulator/device to connect to the remote debugger. As mentioned above, I'm running everything on the same machine. When I chose Setup a clean project with 0.58.6 and everything works just as expected. I started this project with 0.59.0 and I'm now upgraded to 0.59.2 with the issue still persisting. Everything else seems to be working just fine, it's only when trying to connect to the remote debugger. I need to log some datas! Thanks for taking a look, let me know if i can provide more info. |
any fix for this, same issue here @Zeldroxe solution doe not seem to work |
I just fixed the issue on Android using this seems related to android 9. https://stackoverflow.com/posts/50834600/revisions A little |
@ScreamZ doesn't seem to do anything on my end. Unless the It's so odd, I have asked a few others who are into 0.59.x and they aren't having the same issue... The fact that it doesn't work for me on iOS and Android, and it does work for others, makes it feel like something else on my system is different. Possible I have some other network process running on a required port or just some other system level network setting? |
I found a few new data points worth sharing, but still not 100% sure what to do or how to resolve the issue. The first thing I realized is that I didn't have I updated my react-native version to 0.59.3 and still have the issue. Finally I created a brand new project using So idk, I think my issue is maybe different from others and I feel like I'm going to need to try to port my code into the newly created project if I want debugger support (I do). Not sure what else to try! |
Thanks for providing comments and reproductions here. Let's make sure that this gets fixed in 0.59 / 0.60. I am going to put a todo on this issue and be back to it this week to see what's going on. |
This issue has been moved to react-native-community/cli#324. |
💥 Regression Report
Upgraded to RN 0.59.0, and tried to run my app on ios. When I tried to enable remote debugging, I got an error saying that the connection to http://localhost:8081/debugger-proxy?role=client timed out.
I followed the troubleshooting here: http://facebook.github.io/react-native/docs/running-on-device.html#troubleshooting, and confirmed that my local machine's IP address is being detected correctly.
I then tried opening the debugger-ui on chrome by navigating to my local ip (ie 10.27.79.224:8081/debugger-ui) and it failed to connect. This definitely worked in RN 0.57 (from which I upgraded). Testing on RN 0.58.6, this also works.
Last working version
Worked up to version: 0.58.6
Stopped working in version: 0.59.0
To Reproduce
Install React Native version 0.59.0. Run
npm start
to start the packager. Obtain the local machine's IP, and then navigate to the obtained IP:8081/debugger-ui. Connection should be refused, and debugging on a physical ios device is not possible.Expected Behavior
I expect to be able to debug remotely from a physical ios device.
Code Example
n/a
Environment
The text was updated successfully, but these errors were encountered: