Android remote emulator lose connection using ANDROID_ADB_SERVER_ADDRESS
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- android, javascript
- Domaine
- cli, mobile-dev, networking
Piste de recherche
Commencez par reproduire le problème avec ANDROID_ADB_SERVER_ADDRESS={VirtualMachineIP} ns run android --no-hmr et la configuration du serveur adb distant décrite ci-dessus. Suivez la gestion de l’installation, des logs et de la connexion de débogage par l’Android CLI, en prêtant une attention particulière au port localhost indiqué. La tâche est terminée lorsqu’un émulateur distant peut exécuter l’application avec les fonctionnalités de débogage et de logs sans expiration du délai de connexion.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Environment
Component nativescript has 7.2.0 version and is up to date.
✔ Component @nativescript/core has 7.2.1 version and is up to date.
✔ Component @nativescript/ios has 7.2.0 version and is up to date.
✔ Component @nativescript/android has 7.0.1 version and is up to date.
Describe the bug
The use of the command for running on a remote Android emulator (in my case a Virtualbox with Ubuntu 20.04.1 and Android SDK and emulator running) as follows:
$ ANDROID_ADB_SERVER_ADDRESS={VirtualMachineIP} ns run android --no-hmr
The application is installed and has run successfully but the CLI command seems to timeout when trying to connect to the application log with the error:
Installing on device emulator-5554...
Successfully installed on device with identifier 'emulator-5554'.
Unable to apply changes on device: emulator-5554. Error is: connect ECONNREFUSED 127.0.0.1:51258.
Seems like NativeScript is trying to connect to a port in the local machine ignoring the ANDROID_ADB_SERVER_ADDRESS IP address
To Reproduce
- Create an Ubuntu virtual machine with android SDK on a VirtualBox or similar on a Mac OS host machine
- create an Android emulator and run it
- in the virtual machine OS (Ubuntu in this case) terminal run
adb -a -P 5037 nodaemon server - in the host machine (Mac OS in my case) execute an android application with the NativeScript CLI
ANDROID_ADB_SERVER_ADDRESS={VirtualMachineIP} ns run android --no-hmr
Expected behavior
Running an Android application in a remote machine as normal as in host machine with debug and log capabilities.
Additional context
The virtual machine should have bridged adapter configured, I don't know if NAT is also working
- Langage dominant
- JavaScript
- Étoiles
- 1.1k
- Forks
- 204
- Merge moyen
- 1 j 9 h
- PR mergées (30 j)
- 8
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NativeScript/nativescript-cli
-
in-progress
NativeScript/nativescript-cli#6140 · 2 commentaires · 1 personne assignée ·
-
NativeScript/nativescript-cli#6090 · 1 personne assignée ·
-
in progress
NativeScript/nativescript-cli#6015 · 1 réaction · 1 personne assignée ·
-
question
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
NativeScript/nativescript-cli#5992 · 5 commentaires ·
-
feature-pending-triage
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
NativeScript/nativescript-cli#5975 ·