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 #1863

Open
1 task done
NinoDLC opened this issue Jul 31, 2024 · 6 comments
Open
1 task done

Maestro doesn't work with WSL 2 #1863

NinoDLC opened this issue Jul 31, 2024 · 6 comments
Labels
bug Something isn't working maestro cli Related to the command-line Maestro tool P1 Important, valid issues at the top of the work list

Comments

@NinoDLC
Copy link

NinoDLC commented Jul 31, 2024

Is there an existing issue for this?

  • I have searched the existing issues and didn't find mine.

Steps to reproduce

1/ Follow the tutorial : https://maestro.mobile.dev/getting-started/installing-maestro/windows
2/ On Powershell, you should launch this command : 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

3/ On WSL (another tab), you should launch :

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)

Actual results

It obviously doesn't work

Expected results

It should work, as it works on MacOS

About app

N/A, Maestro doesn't even recognize my emulator

About environment

C:\Work> java -version
java version "17.0.5" 2022-10-18 LTS
Java(TM) SE Runtime Environment (build 17.0.5+9-LTS-191)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.5+9-LTS-191, mixed mode, sharing)
C:\Work> wsl
java nino@Desktino:/mnt/c/Work$ java -version
openjdk version "21.0.3" 2024-04-16
OpenJDK Runtime Environment (build 21.0.3+9-Ubuntu-1ubuntu122.04.1)
OpenJDK 64-Bit Server VM (build 21.0.3+9-Ubuntu-1ubuntu122.04.1, mixed mode, sharing)
nino@Desktino:/mnt/c/Work$

Windows 11 Pro 23H2 (22631.3880)
Ubuntu 22.04 (WSL)

Logs

No response

Maestro version

1.37.3

How did you install Maestro?

install script (https://get.maestro.mobile.dev)

Anything else?

No response

@bartekpacia
Copy link
Member

Hey @NinoDLC, did it work on v1.36.x?

@NinoDLC
Copy link
Author

NinoDLC commented Aug 1, 2024

I didn't have the chance to try, this is my first time using Maestro on Windows so I got the last version, as the tutorial suggested

@qazando
Copy link

qazando commented Aug 3, 2024

i have the same problem.

@qazando
Copy link

qazando commented Aug 3, 2024

erro windows
me too

@qazando
Copy link

qazando commented Aug 3, 2024

My friend, i have success now. I changed my version to: 1.19.0. Now i have success on windows.

@dannmf
Copy link

dannmf commented Aug 14, 2024

Ei@NinoDLC, funcionou na v1.36.x?

In 1.36.x it is working correctly

@bartekpacia bartekpacia added bug Something isn't working maestro cli Related to the command-line Maestro tool P0 Critical issues that affect many users P1 Important, valid issues at the top of the work list and removed P0 Critical issues that affect many users labels Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maestro cli Related to the command-line Maestro tool P1 Important, valid issues at the top of the work list
Projects
None yet
Development

No branches or pull requests

4 participants