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

Unable to run parallel/sharded tests on Android #1853

Open
1 task done
simon-gilmurray opened this issue Jul 30, 2024 · 2 comments · May be fixed by #1998
Open
1 task done

Unable to run parallel/sharded tests on Android #1853

simon-gilmurray opened this issue Jul 30, 2024 · 2 comments · May be fixed by #1998
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 platform: android Testing Android apps is affected

Comments

@simon-gilmurray
Copy link

Is there an existing issue for this?

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

Steps to reproduce

It always fail except for on one device when running Android in parallel. Things I've tried:

  • Creating devices from Maestro CLI and using them
  • Using Android Studio created devices
  • Calling a basic command maestro test --shards 3 maestro/
  • Passing in explicit device names maestro --device 'emulator-5554,emulator-5556,emulator-5558' test -s 3 maestro/

Actual results

Only one device seems to run, 2/3 of the tests appear to fail straight away with 0s:

Screenshot 2024-07-30 at 11 57 37

Logs:

[ERROR] m.cli.runner.TestSuiteInteractor - Failed to complete flow
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
    at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
    at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
    at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:165)
    at maestro_android.MaestroDriverGrpc$MaestroDriverBlockingStub.deviceInfo(MaestroDriverGrpc.java:634)
...
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/[0:0:0:0:0:0:0:1]:7006
Caused by: java.net.ConnectException: Connection refused

maestro.log

Expected results

Tests should run in parallel, as they do on iOS which is working fine

About app

React Native

About environment

macOS Sonoma 14.4.1 M2 Pro

Logs

Logs
[maestro.log](https://github.com/user-attachments/files/16430871/maestro.log)

Maestro version

1.37.4

How did you install Maestro?

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

Anything else?

Slack thread:

https://mobile-dev-inc.slack.com/archives/C041FU72T54/p1722341761341199

@bartekpacia
Copy link
Contributor

I did reproduce this problem. I started 2 emulators (API33 and API34), tests on one of them immediately failed, and the rest of flows (=the second half) ran normally on the second emulator.

Weird and definitely a bug.

@bartekpacia bartekpacia added bug Something isn't working P1 Important, valid issues at the top of the work list maestro cli Related to the command-line Maestro tool platform: android Testing Android apps is affected labels Jul 31, 2024
rasyid7 added a commit to rasyid7/maestro that referenced this issue Aug 1, 2024
@bartekpacia
Copy link
Contributor

Should be mitigated by #1867, but the root cause (which is unknown at this moment) still persists.

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 platform: android Testing Android apps is affected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants