I cant connect via wifi React Native
See original GitHub issuePlease provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Hello programmers, I am new to RN, I have a problem that I cannot solve. I am trying to connect via wifi, my react project from my pc with the app generated on my phone.
I have followed the steps in the documentation but still cannot solve it: https://reactnative.dev/docs/running-on-device… When I enter the development menu within the application, I go to the configuration and I enter debug server and port for device and I assign the ip of my computer and port 8081, it returns, “Could not connect to development server” and when I use ngrok, it returns me, ‘’ Invalid URL port: ‘-1’ "
I must clarify that I am using the react version 0.63 and my phone is android version 10, Samsung Galaxy A11 and i use window
.
I need help to solve this as setting react native is very tedious and I am newbie. Thanks a lot !
React Native version:
Run react-native info
in your terminal and copy the results here.
React version 16.13.1
React Native version 0.63.4
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Open the in-app Developer menu.
- Go to Dev Settings → Debug server host & port for device.
- Type in your machine’s IP address and the port of the local dev server (e.g. 10.0.1.1:8081).
- Go back to the Developer menu and select Reload JS.
Expected Results
Connect desktop rn project to the application generated on phone
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top GitHub Comments
It’s worth to try wireless Debugging as well and it’s really easy to setup. Give it a try and see. https://developer.android.com/studio/command-line/adb
Also see the device logs in Android Studio. Hopefully it will print an error and tell why it can’t speak to the metro server
That’s cool. Probably you can close the defect. 😃