-
Notifications
You must be signed in to change notification settings - Fork 276
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
[Feature Request]Support older Android versions #1207
Comments
As per my attempts, the minimum android api level on which maestro will run today is 26, but that is not documented anywhere. I made a pull request to fix the documentation. To help further on this issue, I also tried to run on api levels 21 and newer and found that the issue is that, on older versions, maestro is trying to use an adb command that is unsupported there to list packages installed, and then it is not able to continue. I may help with this in the future if I get sponsorship, but as it is today we cannot adopt maestro since supporting api levels 21 and above is a requirement for the project. |
Meanwhile, this line indicates that maestro indeed intended to support Android API levels 21 and newer, but still versions older than 26 are broken. |
Do you know which command is that? |
This has affected my team as we need to run specifcally on devices using API 25. I've had a quick look into this and think I see the issue... The
This adb command that is run does not seem to work with that
I reckon I can have a go at raising a PR to fix this command for API 25 and below versions, and use this default one still for API 26 and above, unless someone else beats me to it. |
I have fixed this and raised a PR here -> #1527 |
Can this be closed since #1527 has been merged for more than half a year now? |
@bartekpacia seems like
|
Infact, it does not work on a local device either
This is the failure when I am running emulator (API 22) $ maestro test .maestro/*
|
It only goes down to API 25 IIRCSent from my iPhoneOn 15 Jul 2024, at 08:26, Ashish Bhatia ***@***.***> wrote:
Infact, it does not work on a local device either
$ maestro --version
1.36.0
This is the failure when I am running emulator (API 22)
$ maestro test .maestro/*
Picked up JAVA_TOOL_OPTIONS: -Dapple.awt.UIElement=true
Running on emulator-5554
java.io.IOException: pm list packages --user 0 dev.mobile.maestro
at maestro.drivers.AndroidDriver.shell(AndroidDriver.kt:974)
at maestro.drivers.AndroidDriver.isPackageInstalled(AndroidDriver.kt:962)
at maestro.drivers.AndroidDriver.uninstallMaestroDriverApp(AndroidDriver.kt:929)
at maestro.drivers.AndroidDriver.installMaestroDriverApp(AndroidDriver.kt:890)
at maestro.drivers.AndroidDriver.installMaestroApks(AndroidDriver.kt:924)
at maestro.drivers.AndroidDriver.open(AndroidDriver.kt:75)
at maestro.Maestro$Companion.android(Maestro.kt:606)
at maestro.cli.session.MaestroSessionManager.createAndroid(MaestroSessionManager.kt:266)
at maestro.cli.session.MaestroSessionManager.createMaestro(MaestroSessionManager.kt:149)
at maestro.cli.session.MaestroSessionManager.access$createMaestro(MaestroSessionManager.kt:49)
at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:82)
at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:81)
at maestro.cli.db.KeyValueStore.withExclusiveLock(KeyValueStore.kt:37)
at maestro.cli.session.SessionStore.withExclusiveLock(SessionStore.kt:74)
at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:81)
at maestro.cli.session.MaestroSessionManager.newSession$default(MaestroSessionManager.kt:58)
at maestro.cli.command.TestCommand.call(TestCommand.kt:136)
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:117)
Caused by: java.io.IOException: Command failed (shell,v2,raw:pm list packages --user 0 dev.mobile.maestro): closed
at dadb.adbserver.AdbServer.send$dadb(AdbServer.kt:99)
at dadb.adbserver.AdbServerDadb.open(AdbServer.kt:138)
at dadb.Dadb$DefaultImpls.openShell(Dadb.kt:43)
at dadb.adbserver.AdbServerDadb.openShell(AdbServer.kt:118)
at dadb.Dadb$DefaultImpls.shell(Dadb.kt:36)
at dadb.adbserver.AdbServerDadb.shell(AdbServer.kt:118)
at maestro.drivers.AndroidDriver.shell(AndroidDriver.kt:972)
... 26 more
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Is your feature request related to a problem? Please describe.
Some issues show up only on older versions of Android
Describe the solution you'd like
Support older versions of Android at least till API 21.
The text was updated successfully, but these errors were encountered: