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 iOS driver did not start up in time #57

Open
luis-cruzt opened this issue Nov 7, 2024 · 7 comments
Open

Maestro iOS driver did not start up in time #57

luis-cruzt opened this issue Nov 7, 2024 · 7 comments
Assignees

Comments

@luis-cruzt
Copy link

luis-cruzt commented Nov 7, 2024

Hello

I'm having this issue when running the flow on Github Actions, already tried changing to macos-12, macos-12-xl, macos-latest-xlarge, macos-14

maestro.MaestroDriverStartupException$IOSDriverTimeoutException: Maestro iOS driver did not start up in time
	at maestro.drivers.IOSDriver.awaitLaunch(IOSDriver.kt:472)
	at maestro.drivers.IOSDriver.open(IOSDriver.kt:53)
	at maestro.Maestro$Companion.ios(Maestro.kt:624)
	at maestro.cli.session.MaestroSessionManager.createIOS(MaestroSessionManager.kt:[31](https://github.com/xxxxx/actions/runs/11716132080/job/32633672377#step:5:34)0)
	at maestro.cli.session.MaestroSessionManager.createMaestro(MaestroSessionManager.kt:159)
	at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:84)
	at maestro.cli.session.MaestroSessionManager.newSession$default(MaestroSessionManager.kt:52)
	at maestro.cli.command.TestCommand.runShardSuite(TestCommand.kt:297)
	at maestro.cli.command.TestCommand.access$runShardSuite(TestCommand.kt:63)
	at maestro.cli.command.TestCommand$handleSessions$1$results$1$1.invokeSuspend(TestCommand.kt:265)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:[33](https://github.com/xxxxx/actions/runs/11716132080/job/32633672377#step:5:36))
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)
@luis-cruzt
Copy link
Author

@dniHze Do you know how to fix this?

@dniHze
Copy link
Owner

dniHze commented Dec 4, 2024

Any chance you can showcase the repro steps or showcase what your workflow is?

@dniHze dniHze self-assigned this Dec 4, 2024
@pierretoussing
Copy link

Same issue here

@pierretoussing
Copy link

Action looks like this:

ios-e2e-tests:
      needs: ios-build
      runs-on: ['self-hosted', iOS]
      steps:
        - uses: actions/checkout@v4
        - name: Download Build
          id: download_build
          uses: actions/download-artifact@v4
          with:
            name: ios-build
            path: ${{ runner.workspace }}/ios-build
        - name: Rename Build
          run: mv ${{ runner.workspace }}/ios-build ${{ runner.workspace }}/ios-build.app
        - uses: actions/setup-java@v3
          with:
            distribution: 'adopt'
            java-version: '11'
        - uses: futureware-tech/simulator-action@v2
          with:
            model: 'iPhone 15 Pro'
        - uses: dniHze/maestro-test-action@v1
          with:
            flow: ${{ runner.workspace }}/app/.maestro/tests/tasks/CreateTask.yaml
            report: ./ios-maestro-report.xml
            env: |
              APP_ID=${{ needs.setup-env.outputs.ios_app_id }}
              PHONE_NUMBER=${{ secrets.MAESTRO_USER_1_PHONE_NUMBER }}
              LOGIN_CODE=${{ secrets.MAESTRO_USER_1_LOGIN_CODE }}

@dniHze
Copy link
Owner

dniHze commented Dec 6, 2024

Thanks for getting back to me with a log. I plan to upgrade the runner soon, so I will try to check if the newer version broke something since the last time I checked.

@pierretoussing
Copy link

pierretoussing commented Dec 6, 2024

If you need any more logs, please let me know!

@pierretoussing
Copy link

I see the same behaviour for Android:

/usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
  1
  Emulator booted.
  /usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell input keyevent 82
  INFO    | Boot completed in 530171 ms
  INFO    | Increasing screen off timeout, logcat buffer size to 2M.
  Disabling animations.
  /usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell settings put global window_animation_scale 0.0
  /usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell settings put global transition_animation_scale 0.0
  /usr/local/lib/android/sdk/platform-tools/adb -s emulator-5554 shell settings put global animator_duration_scale 0.0
/usr/bin/sh -c maestro test --format=junit --output=report.xml --no-ansi /home/runner/work/benetics/benetics/app/.maestro -e APP_ID=com.benetics.dev -e PHONE_NUMBER=*** -e LOGIN_CODE=*** -e SIGN_UP_PHONE_NUMBER=*** -e SIGN_UP_LOGIN_CODE=***
CI detected, analytics was automatically enabled.
To opt out, set MAESTRO_CLI_NO_ANALYTICS environment variable to any value before running Maestro.
Maestro Android driver did not start up in time  ---  emulator [ emulator-5554 ] & port  [ dadb.open( tcp:7001 ) ]
The stack trace was:
maestro.MaestroDriverStartupException$AndroidDriverTimeoutException: Maestro Android driver did not start up in time  ---  emulator [ emulator-5554 ] & port  [ dadb.open( tcp:7001 ) ]
	at maestro.drivers.AndroidDriver.awaitLaunch(AndroidDriver.kt:156)
	at maestro.drivers.AndroidDriver.open(AndroidDriver.kt:89)
	at maestro.Maestro$Companion.android(Maestro.kt:631)
	at maestro.cli.session.MaestroSessionManager.createAndroid(MaestroSessionManager.kt:269)
	at maestro.cli.session.MaestroSessionManager.createMaestro(MaestroSessionManager.kt:154)
	at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:85)
	at maestro.cli.session.MaestroSessionManager.newSession$default(MaestroSessionManager.kt:53)
	at maestro.cli.command.TestCommand.runShardSuite(TestCommand.kt:297)
	at maestro.cli.command.TestCommand.access$runShardSuite(TestCommand.kt:63)
	at maestro.cli.command.TestCommand$handleSessions$1$results$1$1.invokeSuspend(TestCommand.kt:265)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:[693]

With this action:

android-e2e-tests:	
      needs: 	
        - setup-env	
        - android-build	
      runs-on: 'ubuntu-latest'	
      steps:	
        - uses: actions/checkout@v4	
        - name: Download Build	
          id: download_build	
          uses: actions/download-artifact@v4	
          with:	
            name: android-build	
            path: ${{ runner.workspace }}/android-build	
        - name: Rename Build	
          run: mv ${{ runner.workspace }}/android-build/*.apk ${{ runner.workspace }}/android-build/benetics.apk	
        - uses: actions/setup-java@v3
          with:
            distribution: 'adopt'
            java-version: '11'
        - uses: dniHze/maestro-test-action@v1
        - uses: reactivecircus/android-emulator-runner@v2
          with:
            api-level: 33
            arch: x86_64
            ram-size: 2048M
            target: default
            script: maestro test --format=junit --output=report.xml --no-ansi ${{ runner.workspace }}/app/.maestro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants