react / react/react-native

Device need connect to run App in debug mode(Android)

Ouverte
#58,191 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Needs: Attention Needs: Repro Platform: Android
Langage dominant
C++
Étoiles
127k
Forks
25.3k
Merge moyen
1 j 23 h
PR mergées (30 j)
4

Description

Description

Previous version with React Native 0.81.4: Once I installed the app and configured the bundle, I could disconnect the device from the USB cable or wireless connection and still run/debug the app and make code changes. This functionality has completely stopped in the latest React Native 0.87.1 version. Please fix this.

The scenario I am facing is mentioned below.

Upgrade from React Native 0.81.4 to 0.87

Previously, when we installed the debug APK on the phone, Metro would start and the app would connect to Metro automatically. The app could start even without a USB or wireless connection.

After upgrading from React Native 0.81.4 to 0.87, the behavior has changed.

  1. Metro Connection Requirement

After the upgrade:

The app starts only when either USB debugging or wireless debugging is connected.
If neither USB nor wireless debugging is connected, Metro starts, but the app does not start/connect properly.
2. Bundle Configuration Behavior

Previously, when we configured the bundle while USB and wireless connections were not available:

The app would not start immediately after configuring the bundle.
We could kill the app and reopen it.
On reopening, the app would start successfully.
The configured values would be saved and retained.

After upgrading to React Native 0.87:

We configure the bundle, but the app does not start.
We kill the app and reopen it.
The app again asks us to configure the bundle.
After configuring the bundle again, the app still does not start.
The configured values are not being retained as expected.
3. Behavior When USB/Wireless Is Connected

When either USB or wireless debugging is connected:

The app starts successfully.
After killing the app and opening it again, the app starts successfully on the second attempt.
Summary

The main issue after upgrading from React Native 0.81.4 to 0.87 is that the debug APK now appears to depend on an active USB or wireless Metro connection to start correctly. In addition, when Metro is not connected, the configured bundle values are not being retained after restarting the app.

Steps to reproduce
  • create new react-native project with version 0.87.X and check
  • App install and with usb cable
  • now remove usb cable and configure bundler
  • Kill App and open Again
  • it will not open
  • if usb and wireless dissconnected app will not start , it will ask to bundle configure after bundle configure also app not start , kill ask again to bundle configure and repeat same steps again and again
React Native Version

0.87.1

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info
latest react-native version and CLI
Stacktrace or Logs
Stuck on first line and no going ahead
MANDATORY Reproducer

https://github.com/sandeepkudalepanvel-commits/SocietyMobileApp

Screenshots and Videos

No response

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par le reproducer obligatoire et comparez le démarrage du débogage Android dans React Native 0.81.4 et 0.87.1, avec le débogage USB et sans fil déconnecté. Suivez le flux de connexion à Metro et de configuration du bundle décrit dans le rapport. Le travail est considéré comme terminé lorsque l’application de débogage se lance sans l’une ou l’autre de ces connexions et conserve ses valeurs de bundle configurées après avoir été arrêtée puis rouverte.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
react-native
Domaine
mobile-dev
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
À clarifier
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.