You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a setup where the android emulator is running on my windows machine but my project is in WSL2 on the same machine. I have setup adb so connected devices and emulators are shown when I run adb devices inside WLS2.
Unfortunately when I run npx cap run android I get the following output:
✔ Copying web assets from www to android/app/src/main/assets/public in 185.90ms
✔ Creating capacitor.config.json in android/app/src/main/assets in 2.08ms
⠼ copy android [info] Found 1 Cordova plugin for android:
[email protected]
✔ copy android in 239.00ms
✔ Updating Android plugins in 18.65ms
[info] Found 9 Capacitor plugins for android:
@capacitor-community/[email protected]
@capacitor/[email protected]
@capacitor/[email protected]
@capacitor/[email protected]
@capacitor/[email protected]
@capacitor/[email protected]
@capacitor/[email protected]
@capacitor/[email protected]
@capacitor/[email protected]
⠸ update android [info] Found 1 Cordova plugin for android:
[email protected]
✔ update android in 181.47ms
✔ Running Gradle build in 6.13s
✖ Deploying app-debug.apk to Pixel_3_API_30 - failed!
[error] node:events:368
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 127.0.0.1:5554
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5554
}
Expected Behavior
I expected capacitor to connect to my emulator running on windows.
Other Technical Details
I've done some digging and found that native-run only looks for hardware devices using adb and if none found tries to open an emulator (see ionic-team/native-run#213). In my case it tries to start an emulator on my WLS2 which is not setup.
The text was updated successfully, but these errors were encountered:
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Bug Report
Capacitor Version
Platform(s)
android
Current Behavior
I have a setup where the android emulator is running on my windows machine but my project is in WSL2 on the same machine. I have setup
adb
so connected devices and emulators are shown when I runadb devices
inside WLS2.Unfortunately when I run
npx cap run android
I get the following output:Expected Behavior
I expected capacitor to connect to my emulator running on windows.
Other Technical Details
I've done some digging and found that
native-run
only looks for hardware devices using adb and if none found tries to open an emulator (see ionic-team/native-run#213). In my case it tries to start an emulator on my WLS2 which is not setup.The text was updated successfully, but these errors were encountered: