Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maestro doesn't work with WSL 2 #1851

Closed
NinoDLC opened this issue Jul 30, 2024 · 3 comments
Closed

Maestro doesn't work with WSL 2 #1851

NinoDLC opened this issue Jul 30, 2024 · 3 comments
Labels
host: windows-wsl Running tests on Windows (WSL) hosts is affected waiting for customer response More information is needed from the customer before we can progress on the issue

Comments

@NinoDLC
Copy link

NinoDLC commented Jul 30, 2024

Followed everything there : https://maestro.mobile.dev/getting-started/installing-maestro/windows

On powershell I have:

C:\Work> adb -a -P 5037 nodaemon server
07-30 15:36:51.787 14820 14216 I adb.exe : auth.cpp:416 adb_auth_init...
07-30 15:36:51.792 14820 14216 I adb.exe : auth.cpp:152 loaded new key from 'C:\Users\Nino\.android\adbkey' with fingerprint <...>
07-30 15:36:51.792 14820  8748 I adb.exe : transport.cpp:338 emulator-5554: read thread spawning
07-30 15:36:51.793 14820 10548 I adb.exe : transport.cpp:310 emulator-5554: write thread spawning
07-30 15:36:51.802 14820 14216 I adb.exe : transport.cpp:1704 fetching keys for transport emulator-5554
07-30 15:36:51.802 14820 14216 I adb.exe : auth.cpp:468 Calling send_auth_response
07-30 15:36:51.820 14820 14216 I adb.exe : adb.cpp:180 emulator-5554: offline

Then on WSL 2 (Ubuntu 22.04), on another tab:

C:\Work> wsl
nino@Desktino:/mnt/c/Work$ adb kill-server
cannot connect to daemon at tcp:5037: Connection refused
nino@Desktino:/mnt/c/Work$ export ADB_SERVER_SOCKET=tcp:192.168.1.10:5037
nino@Desktino:/mnt/c/Work$ adb devices
List of devices attached
emulator-5554   device

nino@Desktino:/mnt/c/Work$ cd lapresse/rubicon
nino@Desktino:/mnt/c/Work/lapresse/rubicon$ maestro --host 192.168.1.10 test -e APP_ID=ca.lapresse.android.lapressemobile.debug flows/run_flow.yaml

------------------ Shard 1 ------------------

Please specify a device platform [android, ios, web]:
android

Please specify Android version [34, 33, 31, 30, 29, 28]: Press ENTER for default (30)


Attempting to create Android emulator: Maestro_Pixel_6_API_30_1

Created Android emulator: Maestro_Pixel_6_API_30_1 (system-images;android-30;google_apis;x86_64)

❌ Error: BlockingCoroutine is cancelling
kotlinx.coroutines.JobCancellationException: BlockingCoroutine is cancelling; job=BlockingCoroutine{Cancelling}@28a65353
Caused by: maestro.cli.CliError: Unable to start device: Maestro_Pixel_6_API_30_1
        at maestro.cli.device.DeviceService.startDevice(DeviceService.kt:74)
        at maestro.cli.command.TestCommand$handleSessions$1$1$results$1$1.invokeSuspend(TestCommand.kt:237)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Note :

  • 192.168.1.10 is my local adress (found with ipconfig via Powershell), I don't know what is meant by "Note down the IPV4 address of your Windows host PC/machine." in the tutorial, but I guess this is it.
  • The test suite is already working on MacOS (they are running the command without the --host param)
  • I tried with an Android 35 emulator, and then with an Android 30 emulator, to no avail.
@NinoDLC NinoDLC changed the title Maestro doesn't work with WSL Maestro doesn't work with WSL 2 Jul 30, 2024
@bartekpacia bartekpacia added the host: windows-wsl Running tests on Windows (WSL) hosts is affected label Jul 31, 2024
@bartekpacia
Copy link
Member

Hi @NinoDLC, thanks a lot for this bug report. Could you please adapt it to follow the bug report template? You can create a new issue, paste existing stuff, and fill out fields that are missing. Thank you.

@bartekpacia bartekpacia added the waiting for customer response More information is needed from the customer before we can progress on the issue label Jul 31, 2024
@bartekpacia
Copy link
Member

Closing as a very likely duplicate of #1863

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.
Thank you for helping keep us our issue tracker clean!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: windows-wsl Running tests on Windows (WSL) hosts is affected waiting for customer response More information is needed from the customer before we can progress on the issue
Projects
None yet
Development

No branches or pull requests

2 participants