NativeScript / NativeScript/nativescript-cli
Android remote emulator lose connection using ANDROID_ADB_SERVER_ADDRESS
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 204
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 8
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、ANDROID_ADB_SERVER_ADDRESS={VirtualMachineIP} ns run android --no-hmr と、上記で説明されているリモート adb サーバーのセットアップを使って問題を再現します。Android CLI によるインストール、ログ、デバッグ接続の処理を追跡し、報告されている localhost ポートに特に注意してください。リモートエミュレーターで、接続タイムアウトなしにデバッグおよびログ機能を利用してアプリケーションを実行できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, javascript
- 領域
- cli, mobile-dev, networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100