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

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

Closed
bipin-k opened this issue May 15, 2023 · 4 comments
Labels
bug Something isn't working platform: android Testing Android apps is affected

Comments

@bipin-k
Copy link

bipin-k commented May 15, 2023

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

  • Maestro version [e.g. v1.2.3] - 1.27.0
  • Platform: [e.g. iOS 16.4.1, Android 11.0, Chrome] - v10
  • Framework: [Native iOS/Android, Flutter, React Native, etc] - React Native
  • Device model and OS version: [e.g. iPhone6] - OnePlus 5T - OnePlus A5010
  • Simulator, emulator or physical device - Physical Device
  • Host [e.g. Mac M1, Windows, Linux, etc] - Mac Intel

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

@bipin-k bipin-k added the bug Something isn't working label May 15, 2023
@axelniklasson axelniklasson added the platform: android Testing Android apps is affected label May 16, 2023
@axelniklasson
Copy link
Contributor

Relates to #829

@igorsmotto
Copy link
Contributor

Duplicate of #829

@igorsmotto igorsmotto marked this as a duplicate of #829 May 16, 2023
@laxkarparas1
Copy link

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

Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working platform: android Testing Android apps is affected
Projects
None yet
Development

No branches or pull requests

4 participants