mobile-dev-inc / maestro

Painless Mobile UI Automation
https://maestro.mobile.dev/
Apache License 2.0
5.79k stars 270 forks source link

Failed to install apk while running Tests at `maestro.drivers.AndroidDriver.install(AndroidDriver.kt:761)` #1073

Closed bipin-k closed 1 year ago

bipin-k commented 1 year ago

Describe the bug Unable to execute the test script as expected.

To Reproduce

  1. Connect Mobile device and make sure the app is pre-installed,
  2. Run maestro test mpl.yaml
  3. The Flow fails at ...
➜  ~ maestro test Desktop/mpl.yaml
Running on 2ae9c69c

java.io.IOException: Failed to install apk /var/folders/vz/4l9pz0yx3v30kt_xwwk1ql1w0000gp/T/maestro-app5230371881326634187.apk: Install failed:
    at maestro.drivers.AndroidDriver.install(AndroidDriver.kt:761)
    at maestro.drivers.AndroidDriver.installMaestroApks(AndroidDriver.kt:741)
    at maestro.drivers.AndroidDriver.open(AndroidDriver.kt:92)
    at maestro.Maestro$Companion.android(Maestro.kt:557)
    at maestro.cli.session.MaestroSessionManager.createAndroid(MaestroSessionManager.kt:270)
    at maestro.cli.session.MaestroSessionManager.createMaestro(MaestroSessionManager.kt:151)
    at maestro.cli.session.MaestroSessionManager.access$createMaestro(MaestroSessionManager.kt:49)
    at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:81)
    at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:80)
    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:80)
    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)
Caused by: java.io.IOException: Install failed:
    at dadb.Dadb$DefaultImpls.install(Dadb.kt:85)
    at dadb.adbserver.AdbServerDadb.install(AdbServer.kt:118)
    at maestro.drivers.AndroidDriver.install(AndroidDriver.kt:759)
    ... 23 more

Expected behavior Test Script should be executed successfully.

Environment information

Test Script

appId: com.mpl.androidapp
---
- launchApp
- waitForAnimationToEnd:
    timeout: 60000
- tapOn: "Set Language to English"

2023-05-15_195352.zip 2023-05-15_195840.zip 2023-05-15_200743.zip 2023-05-15_201019.zip 2023-05-15_202423.zip 2023-05-15_202619.zip

axelniklasson commented 1 year ago

Relates to #829

igorsmotto commented 1 year ago

Duplicate of https://github.com/mobile-dev-inc/maestro/issues/829

laxkarparas1 commented 9 months ago

wireless debugging works well and if we are debugging through wired connect physical device it throws error

github-actions[bot] commented 3 months ago

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!