Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB

Tags:

React Native app debug on real device has some problems;

My metro bundler console gives warn:

warn No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB. 

warning and that cause real IOS device connection problem.

When I try to reload my react native app from Chrome React Native Debugger, it gives above warning and I can not debug my code from on Chrome

react-native: 0.62.2,

IOS: 13.6

It happens on Real device connection. When I work with IOS simulator, there is not problem.

NOTE: My phone and macbook on SAME wi-fi network.

So problem is not related to different wi-fi network usage.

like image 981
hakkikonu Avatar asked Jul 16 '20 14:07

hakkikonu


People also ask

How do I run React Native app in terminal?

Running your React Native application Install the Expo Go app on your iOS or Android phone and connect to the same wireless network as your computer. On Android, use the Expo Go app to scan the QR code from your terminal to open your project.


1 Answers

⚠️ For iOS users :

Check that your build target is Debug :

Xcode Product => Scheme => Edit Scheme => Debug (and not release ! )

⚠️ For Android users :

I have found a solution that I posted on github. Not the best but it could be useful:

First, you have to open MainApplication.java and remove import com.facebook.react.BuildConfig;

Next, follow these steps :

    # Reset metro bundler cache :      `npx react-native start --reset-cache`              # Remove Android assets cache :      `cd android && ./gradlew clean`              # Relaunch metro server :      `npx react-native run-android` 

And see the magic 🎉

See here : https://github.com/facebook/react-native/issues/29396

like image 52
Azylaans Avatar answered Sep 21 '22 01:09

Azylaans