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.

I cant connect via wifi React Native

See original GitHub issue

Please 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 157439582_3749920775126460_8504866976268023236_n 157603829_4209973549036663_1781613050716477561_n

. 157204157_941912049949981_2788395090109343481_n Uploading 157344196_446898970076810_5610527788702357108_n.jpg…

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.

  1. Open the in-app Developer menu.
  2. Go to Dev Settings → Debug server host & port for device.
  3. Type in your machine’s IP address and the port of the local dev server (e.g. 10.0.1.1:8081).
  4. 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:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
samithafcommented, Mar 8, 2021

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

0reactions
samithafcommented, Mar 9, 2021

That’s cool. Probably you can close the defect. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Run React Native App On Real Device using Wi-Fi
In this post, we will show you how you can connect your device to your development server using Wi-Fi to run the React...
Read more >
Connect Your react native app via wifi - YouTube
first connect your external device(your phone ) and laptop with same wifi.
Read more >
React native release version cant connect to internet
This is a strange problem, and I have not encountered it before. All accesses are checked and the debug version works perfectly without...
Read more >
Running On Device - React Native
Method 2: Connect via Wi-Fi​ · Make sure your laptop and your phone are on the same Wi-Fi network. · Open your React...
Read more >
How to Handle Network Connection in Your React Native App
If the user is offline or doesn't have access to a decent internet connection, you can operate on a different path.
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