maestro icon indicating copy to clipboard operation
maestro copied to clipboard

Running a repeat loop crashes Maestro

Open TheBishopOfSoho opened this issue 3 years ago • 1 comments

Im getting the following error when trying to repeat an action in a test (Ive replaced the actiual app id with a dummy value):

` java.io.IOException: Shell command failed (run-as my.app.id find -type d): run-as: package not debuggable: my.app.id

    at maestro.android.AndroidAppFiles.shell(AndroidAppFiles.kt:75)
    at maestro.android.AndroidAppFiles.listRemoteFiles(AndroidAppFiles.kt:66)
    at maestro.android.AndroidAppFiles.pull(AndroidAppFiles.kt:19)
    at maestro.drivers.AndroidDriver.pullAppState(AndroidDriver.kt:201)
    at maestro.Maestro.pullAppState(Maestro.kt:81)
    at maestro.orchestra.Orchestra.runInitFlow(Orchestra.kt:96)
    at maestro.cli.runner.MaestroCommandRunner.runCommands(MaestroCommandRunner.kt:98)
    at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:32)
    at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:29)
    at maestro.cli.runner.TestRunner.runCatching(TestRunner.kt:116)
    at maestro.cli.runner.TestRunner.runSingle(TestRunner.kt:29)
    at maestro.cli.command.TestCommand.call(TestCommand.kt:60)
    at maestro.cli.command.TestCommand.call(TestCommand.kt:30)
    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 picocli.CommandLine.execute(CommandLine.java:2058)
    at maestro.cli.AppKt.main(App.kt:94)

` The test that caused this is here (note all the steps in the init file work fine:

appId: my.app.id initFlow: valid_user_signin.yml

  • repeat: times: 3 commands: - tapOn: "Settings" - scroll - back

TheBishopOfSoho avatar Oct 21 '22 12:10 TheBishopOfSoho

Sorry, formatting is not working for the latter block

TheBishopOfSoho avatar Oct 21 '22 12:10 TheBishopOfSoho

The issue is in the usage of initFlow - it required app to be debuggable.

Note that we have deprecated initFlow and recommend using runFlow instead

dmitry-zaitsev avatar Nov 15 '22 10:11 dmitry-zaitsev

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 Jul 11 '24 17:07 github-actions[bot]