Skip to content

Unable to run parallel/sharded tests on Android #1853

@simon-gilmurray

Description

@simon-gilmurray

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important, valid issues at the top of the work listbugSomething isn't workingmaestro cliRelated to the command-line Maestro toolplatform: androidTesting Android apps is affected

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions