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 in GitHub Action times out "Maestro Android driver did not start up in time" #965

Open
latorante opened this issue Mar 31, 2023 · 6 comments
Labels
good first issue Good for newcomers wanting to contribute

Comments

@latorante
Copy link

Hey hey,

I've got a GitHub Action, which runs on macos-12 and starts up an emulator to run tests on. The Action fails to start and ends up with this error:

java.util.concurrent.TimeoutException: Maestro Android driver did not start up in time
	at maestro.drivers.AndroidDriver.awaitLaunch(AndroidDriver.kt:138)
	at maestro.drivers.AndroidDriver.open(AndroidDriver.kt:102)
	at maestro.Maestro$Companion.android(Maestro.kt:543)
	at maestro.Maestro$Companion.android$default(Maestro.kt:536)
	at maestro.cli.session.MaestroSessionManager.createMaestro(MaestroSessionManager.kt:149)
	at maestro.cli.session.MaestroSessionManager.access$createMaestro(MaestroSessionManager.kt:46)
	at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:78)
	at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:77)
	at maestro.cli.db.KeyValueStore.withExclusiveLock(KeyValueStore.kt:37)
	at maestro.cli.session.SessionStore.withExclusiveLock(SessionStore.kt:74)
	at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:77)
	at maestro.cli.session.MaestroSessionManager.newSession$default(MaestroSessionManager.kt:54)
	at maestro.cli.command.TestCommand.call(TestCommand.kt:124)
	at maestro.cli.command.TestCommand.call(TestCommand.kt:42)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1933)
	at picocli.CommandLine.access$1200(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2159)
	at maestro.cli.DisableAnsiMixin$Companion.executionStrategy(DisableAnsiMixin.kt:22)
	at picocli.CommandLine.execute(CommandLine.java:2058)
	at maestro.cli.AppKt.main(App.kt:125)

I have noticed others already mentioned this, and there was a PR updating the timeout to 15 seconds (here: https://github.com/mobile-dev-inc/maestro/blob/main/maestro-client/src/main/java/maestro/drivers/AndroidDriver.kt#L781) but is there a way to pass this down as a ENV Variable possibly?

That way I could see if the issue is the wait time, or perhaps something else?

This is how the action looks like - Java and emulator runner.

    - name: Set up JDK
      uses: actions/setup-java@v3
      with:
        java-version: 11
        distribution: 'temurin'
    - name: Cold boot device, test
      uses: reactivecircus/android-emulator-runner@v2
      with:
        api-level: 33
        target: google_apis_playstore
        arch: x86_64
        profile: pixel_4
        avd-name: AVD
        force-avd-creation: false
        emulator-options: -no-snapshot-load -gpu swiftshader_indirect -no-window -noaudio -no-boot-anim -camera-back none
        script: |
          maestro test ./maestro/flows/Login.yaml;
@felipevolpone
Copy link
Contributor

@latorante Right now there isn't a way to customize the wait time, but if you want to contribute to Maestro, please feel free to open a PR and drive the solution.

@felipevolpone felipevolpone added the good first issue Good for newcomers wanting to contribute label Apr 24, 2023
@retyui
Copy link

retyui commented Apr 28, 2023

we tried to use macos-12 and this configuration of runners too slow and tests are failing flaky :(

Try to use macos-12-xl instead https://github.blog/2023-03-01-github-actions-introducing-faster-github-hosted-x64-macos-runners/

@theinterlocker7
Copy link

Thanks @felipevolpone and @retyui . I will consider those options!

@ashishb
Copy link

ashishb commented Jun 20, 2023

@theinterlocker7 did it work?

@Ademsk1
Copy link

Ademsk1 commented Aug 18, 2023

If you have access to large github runners, try ubuntu 4core and install KVM.
See here

@bartekpacia
Copy link
Contributor

likely a duplicate of #1585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers wanting to contribute
Projects
None yet
Development

No branches or pull requests

7 participants