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

[Android] Fails with io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason error #1026

Closed
doneitas opened this issue Apr 27, 2023 · 1 comment
Labels
bug Something isn't working platform: android Testing Android apps is affected

Comments

@doneitas
Copy link

doneitas commented Apr 27, 2023

Hey, thank you for the awesome framework!

I'm setting up maestro and running some sample tests. Maestro launches the app successfully but fails on the tap action.
Occurs when running maestro test on Android emulator on Mac mini which is used as Gitlab Runner, locally on my machine everything works fine.

Anybody experienced this?

Error:

 > Flow
Launch app "com.example.app"... COMPLETED
Tap on id: navigate_button...io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
	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:475)
	at maestro.drivers.AndroidDriver.deviceInfo(AndroidDriver.kt:159)
	at maestro.Maestro.fetchDeviceInfo(Maestro.kt:56)
	at maestro.Maestro.access$fetchDeviceInfo(Maestro.kt:38)
	at maestro.Maestro$cachedDeviceInfo$2.invoke(Maestro.kt:42)
	at maestro.Maestro$cachedDeviceInfo$2.invoke(Maestro.kt:41)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at maestro.Maestro.getCachedDeviceInfo(Maestro.kt:41)
	at maestro.Maestro.deviceInfo(Maestro.kt:50)
	at maestro.orchestra.Orchestra.deviceInfo(Orchestra.kt:721)
	at maestro.orchestra.Orchestra.findElement(Orchestra.kt:708)
	at maestro.orchestra.Orchestra.findElement$default(Orchestra.kt:693)
	at maestro.orchestra.Orchestra.tapOnElement(Orchestra.kt:622)
	at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:172)
	at maestro.orchestra.Orchestra.executeCommands(Orchestra.kt:150)
	at maestro.orchestra.Orchestra.runFlow(Orchestra.kt:93)
	at maestro.cli.runner.MaestroCommandRunner.runCommands(MaestroCommandRunner.kt:120)
	at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:36)
	at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:32)
	at maestro.cli.runner.TestRunner.runCatching(TestRunner.kt:123)
	at maestro.cli.runner.TestRunner.runSingle(TestRunner.kt:32)
	at maestro.cli.command.TestCommand$call$1.invoke(TestCommand.kt:163)
	at maestro.cli.command.TestCommand$call$1.invoke(TestCommand.kt:124)
	at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:99)
	at maestro.cli.session.MaestroSessionManager.newSession$default(MaestroSessionManager.kt:57)
	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)

.yaml:

appId: com.example.app
---
- launchApp
- tapOn:
    id: 'navigate_button'
- assertVisible: 'Random text'

Environment details:

  • Android Emulator 32.1.12
  • Android 13 (system-images/android-33/google_apis/arm64-v8a)
  • Android SDK Build-Tools 33.0.0
  • Android SDK Platform-Tools 34.0.1
  • macOS 13.3
@Leland-Takamine Leland-Takamine added the bug Something isn't working label May 3, 2023
@axelniklasson axelniklasson added the platform: android Testing Android apps is affected label May 16, 2023
@Fishbowler
Copy link
Contributor

Closing this as a duplicate of #893.
Still hunting for a reproducible path on that - several folk hitting it consistently, but no clue why them and not others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: android Testing Android apps is affected
Projects
None yet
Development

No branches or pull requests

4 participants