maestro icon indicating copy to clipboard operation
maestro copied to clipboard

onTap causes Crash (Android, Mac, 1.25.0)

Open iapetus98 opened this issue 3 years ago • 16 comments

Test runs until the first onTap, at which point it crashes with the following (unhelpful to a new user) stack trace:

io.grpc.StatusRuntimeException: UNKNOWN
        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.tap(MaestroDriverGrpc.java:496)
        at maestro.drivers.AndroidDriver.tap(AndroidDriver.kt:217)
        at maestro.Maestro.hierarchyBasedTap-9V-jo0g(Maestro.kt:298)
        at maestro.Maestro.performTap-9V-jo0g(Maestro.kt:253)
        at maestro.Maestro.tap-egYXmKw(Maestro.kt:187)
        at maestro.orchestra.Orchestra.tapOnElement(Orchestra.kt:599)
	at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:163)
	at maestro.orchestra.Orchestra.executeCommands(Orchestra.kt:141)
	at maestro.orchestra.Orchestra.runFlow(Orchestra.kt:92)
	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:96)
	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)

iapetus98 avatar Mar 14 '23 16:03 iapetus98

# flow.yaml

appId: com.student
---
- launchApp
- assertVisible: "Summer School: English"
- tapOn: "Summer School: English"

iapetus98 avatar Mar 14 '23 16:03 iapetus98

+1 to this. Even we faced this issue and downgrading to 1.23.0 worked.

FYI @dmitry-zaitsev

olttwa avatar Mar 21 '23 06:03 olttwa

Thanks for surfacing this, I am looking into it

dmitry-zaitsev avatar Mar 21 '23 13:03 dmitry-zaitsev

+1 to this as well as I am currently facing this issue. Is there any update @dmitry-zaitsev?

S-ipk avatar Apr 03 '23 14:04 S-ipk

I am also facing this issue. Is there any update @dmitry-zaitsev?

dhruvgoyal762 avatar Apr 17 '23 07:04 dhruvgoyal762

We have made a lot of improvements and fixes since, can you upgrade to the latest version of Maestro and try again?

ArthurSav avatar May 03 '23 15:05 ArthurSav

Can please also provide some additional info. Do you run this on a device or emulator. And if so, what is the Android version / device specs if applicable?

ArthurSav avatar May 16 '23 08:05 ArthurSav

I was using a device and it has android version 12

dhruvgoyal762 avatar May 16 '23 08:05 dhruvgoyal762

Related issue: #1026

axelniklasson avatar May 16 '23 08:05 axelniklasson

Hi folks, could you please try the latest version (1.28.0) and let us know whether the issue is still present? Upgrade instructions here. Thanks!

axelniklasson avatar May 30 '23 11:05 axelniklasson

@axelniklasson I have the same problem in 1.28.0. However it doesn't happen every time, only once in 4 or 5 times. Problem is when script is tapping the button.

Config:

[INFO ] MAESTRO - ---- System Info ----
[INFO ] MAESTRO - Maestro Version: 1.28.0
[INFO ] MAESTRO - OS Name: Mac OS X
[INFO ] MAESTRO - OS Version: 13.3.1
[INFO ] MAESTRO - Architecture: aarch64
[INFO ] MAESTRO - ---------------------

Logs:

[INFO ] maestro.Maestro - Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Profil, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=, clickable=false, bounds=[716,2111][796,2155], enabled=true, focused=false, checked=false, selected=false}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=716, y=2111, width=80, height=44))
[INFO ] maestro.Maestro - Refreshed element
[INFO ] maestro.Maestro - Tapping at (756, 2133) using hierarchy based logic for wait
[INFO ] maestro.utils.ScreenshotUtils - Taking screenshot to byte array
[INFO ] maestro.utils.ScreenshotUtils - Taking screenshot to output sink
[INFO ] maestro.Maestro - Taking screenshot: /var/folders/nx/d7jlzb595hb1py0wln9yjv4w0000gn/T/screenshot-168673997737212900394360999092995.png
[INFO ] maestro.utils.ScreenshotUtils - Taking screenshot to output sink
[ERROR] maestro.cli.runner.TestRunner - Failed to run flow
io.grpc.StatusRuntimeException: UNKNOWN
	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.viewHierarchy(MaestroDriverGrpc.java:588)
	at maestro.drivers.AndroidDriver.contentDescriptor(AndroidDriver.kt:263)
	at maestro.ViewHierarchy$Companion.from-c1iYVAs(ViewHierarchy.kt:29)
	at maestro.utils.ScreenshotUtils$Companion.viewHierarchy-c1iYVAs(ScreenshotUtils.kt:79)
	at maestro.utils.ScreenshotUtils$Companion.waitForAppToSettle-d60svg8(ScreenshotUtils.kt:39)
	at maestro.drivers.AndroidDriver.waitForAppToSettle-FTAEaK0(AndroidDriver.kt:529)
	at maestro.Maestro.waitForAppToSettle-FTAEaK0(Maestro.kt:422)
	at maestro.Maestro.waitForAppToSettle-FTAEaK0$default(Maestro.kt:421)
	at maestro.Maestro.hierarchyBasedTap-9V-jo0g(Maestro.kt:312)
	at maestro.Maestro.performTap-9V-jo0g(Maestro.kt:260)
	at maestro.Maestro.tap-vUA2mXM(Maestro.kt:192)
	at maestro.orchestra.Orchestra.tapOnElement(Orchestra.kt:651)
	at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:173)
	at maestro.orchestra.Orchestra.executeCommands(Orchestra.kt:150)
	at maestro.orchestra.Orchestra.runFlow(Orchestra.kt:93)
	at maestro.cli.runner.MaestroCommandRunner.runCommands(MaestroCommandRunner.kt:179)
	at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:45)
	at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:42)
	at maestro.cli.runner.TestRunner.runCatching(TestRunner.kt:138)
	at maestro.cli.runner.TestRunner.runSingle(TestRunner.kt:42)
	at maestro.cli.command.TestCommand$call$1.invoke(TestCommand.kt:166)
	at maestro.cli.command.TestCommand$call$1.invoke(TestCommand.kt:126)
	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:126)
	at maestro.cli.command.TestCommand.call(TestCommand.kt:44)
	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:136)

michal-chojnacki avatar Jun 14 '23 13:06 michal-chojnacki

Facing this issue consistently in one of my flows. Using latest version of maestro: 1.31.0. cc: @axelniklasson

Physical device: Redmi 9 Activ Android Version: 11

[INFO ] MAESTRO - ---- System Info ----
[INFO ] MAESTRO - Maestro Version: 1.31.0
[INFO ] MAESTRO - OS Name: Mac OS X
[INFO ] MAESTRO - OS Version: 13.5
[INFO ] MAESTRO - Architecture: aarch64
[INFO ] MAESTRO - ---------------------
io.grpc.StatusRuntimeException: UNKNOWN
	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.viewHierarchy(MaestroDriverGrpc.java:588)
	at maestro.drivers.AndroidDriver.contentDescriptor(AndroidDriver.kt:266)
	at maestro.ViewHierarchy$Companion.from-c1iYVAs(ViewHierarchy.kt:29)
	at maestro.utils.ScreenshotUtils$Companion.viewHierarchy-c1iYVAs(ScreenshotUtils.kt:79)
	at maestro.utils.ScreenshotUtils$Companion.waitForAppToSettle-d60svg8(ScreenshotUtils.kt:41)
	at maestro.drivers.AndroidDriver.waitForAppToSettle-FTAEaK0(AndroidDriver.kt:532)
	at maestro.Maestro.waitForAppToSettle-FTAEaK0(Maestro.kt:444)
	at maestro.Maestro.waitForAppToSettle-FTAEaK0$default(Maestro.kt:443)
	at maestro.Maestro.hierarchyBasedTap-SQoEMdc(Maestro.kt:334)
	at maestro.Maestro.performTap-SQoEMdc(Maestro.kt:264)
	at maestro.Maestro.tap-YkR-rlI(Maestro.kt:184)
	at maestro.orchestra.Orchestra.tapOnElement(Orchestra.kt:736)
	at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:245)
	at maestro.orchestra.Orchestra.executeCommands(Orchestra.kt:208)
	at maestro.orchestra.Orchestra.runFlow(Orchestra.kt:118)
	at maestro.orchestra.Orchestra.runFlow$default(Orchestra.kt:82)
	at maestro.cli.runner.MaestroCommandRunner.runCommands(MaestroCommandRunner.kt:185)
	at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:54)
	at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:51)
	at maestro.cli.runner.TestRunner.runCatching(TestRunner.kt:145)
	at maestro.cli.runner.TestRunner.runSingle(TestRunner.kt:51)
	at maestro.cli.command.TestCommand$call$1.invoke(TestCommand.kt:178)
	at maestro.cli.command.TestCommand$call$1.invoke(TestCommand.kt:137)
	at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:100)
	at maestro.cli.session.MaestroSessionManager.newSession$default(MaestroSessionManager.kt:57)
	at maestro.cli.command.TestCommand.call(TestCommand.kt:137)
	at maestro.cli.command.TestCommand.call(TestCommand.kt:46)
	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:126)

saihemanth121 avatar Sep 04 '23 11:09 saihemanth121

Anyone still hitting this on v1.39.x?

Fishbowler avatar Feb 11 '25 21:02 Fishbowler

No instances in 8 months, I'm happy to call this done :)

Thanks everyone!

Fishbowler avatar Oct 06 '25 21:10 Fishbowler

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. Thank you for helping keep us our issue tracker clean!

github-actions[bot] avatar Oct 14 '25 00:10 github-actions[bot]