maestro icon indicating copy to clipboard operation
maestro copied to clipboard

launch app returns “Unable to launch app com.android.settings: UNAVAILABLE: io exception”

Open Linda415 opened this issue 2 years ago • 8 comments

2023-05-25_191935.zip

Linda415 avatar May 25 '23 11:05 Linda415

@Linda415 we need more information on this. Was the app installed on the simulator before running the maestro command? Is the app native? If so, which platform? Which simulator have you used? If it's Android, what API level?

felipevolpone avatar Jun 01 '23 13:06 felipevolpone

I regularly encounter this as well. Running locally on emulator, target API 33, app already installed and working as normal. I'm just tapping "up" in the terminal to rerun a flow, and then it suddenly throws the mentioned exception. The issue persist even after restarting the emulator and uninstalling and reinstalling the app. I even booted up another emulator and the error is still there. Suddenly, it decides to work again 🤷

Dambakk avatar Jun 02 '23 13:06 Dambakk

I encountered the above error when running the binary created with Flutter.

I tried both with API level 30 and 32, but both throw the same error as above.

Simulator uses two points in the image

Just in case, the log that was spit out is output. app_id is replaced with sample.app

maestro.log.zip

image

PictoMki avatar Jul 01 '23 06:07 PictoMki

I got this error when running the same test flow that was working last week

[Failed] login-flow (4s) (Unable to launch app app.test: UNAVAILABLE: io exception)

I'm working with an Android device (a real one), it was working last week, but not now.

maestro.log

[INFO ] MAESTRO - ---- System Info ---- [INFO ] MAESTRO - Maestro Version: 1.30.2 [INFO ] MAESTRO - OS Name: Mac OS X [INFO ] MAESTRO - OS Version: 13.1 [INFO ] MAESTRO - Architecture: aarch64 [INFO ] MAESTRO - --------------------- [INFO ] m.cli.runner.TestSuiteInteractor - Apply configuration RUNNING [INFO ] m.cli.runner.TestSuiteInteractor - Apply configuration COMPLETED [INFO ] m.cli.runner.TestSuiteInteractor - Define variables RUNNING [INFO ] m.cli.runner.TestSuiteInteractor - Define variables COMPLETED [INFO ] m.cli.runner.TestSuiteInteractor - Run ../elements/loadElements.yaml RUNNING [INFO ] m.cli.runner.TestSuiteInteractor - Apply configuration RUNNING [INFO ] m.cli.runner.TestSuiteInteractor - Apply configuration COMPLETED [INFO ] m.cli.runner.TestSuiteInteractor - Run home.js RUNNING [INFO ] m.cli.runner.TestSuiteInteractor - Run home.js COMPLETED [INFO ] m.cli.runner.TestSuiteInteractor - Run login.js RUNNING [INFO ] m.cli.runner.TestSuiteInteractor - Run login.js COMPLETED [INFO ] m.cli.runner.TestSuiteInteractor - Run menu.js RUNNING [INFO ] m.cli.runner.TestSuiteInteractor - Run menu.js COMPLETED [INFO ] m.cli.runner.TestSuiteInteractor - Run myaccount.js RUNNING [INFO ] m.cli.runner.TestSuiteInteractor - Run myaccount.js COMPLETED [INFO ] m.cli.runner.TestSuiteInteractor - Run ../elements/loadElements.yaml COMPLETED [INFO ] m.cli.runner.TestSuiteInteractor - Launch app "ag.granular.insights.test" RUNNING [INFO ] maestro.Maestro - Launching app ag.granular.insights.test [INFO ] m.cli.runner.TestSuiteInteractor - Launch app "ag.granular.insights.test" FAILED [INFO ] maestro.Maestro - Taking screenshot: /var/folders/66/c6_dflcx5tjf0s2kqr2yr98c0000gq/T/screenshot-16896095062162801085986439077649.png [INFO ] maestro.utils.ScreenshotUtils - Taking screenshot to output sink

BrandonKandC avatar Jul 17 '23 16:07 BrandonKandC

I found a workaround here. When I ran maestro test ~flow.yaml with the corresponding Android emulator I wanted to test open in maestro studio, I was able to successfully test it without the above error.

PictoMki avatar Sep 03 '23 06:09 PictoMki

Hey folks, can you try to check if devices were reachable with adb. Its an IOException it seems like the device might not be reachable.

amanjeetsingh150 avatar Oct 23 '23 08:10 amanjeetsingh150

Tip: Maestro Studio can now run simultaneously alongside other Maestro CLI commands!

And that exactly what happened to me. I had maestro studio connected on my iOS simulator on a different terminal window and used a different terminal to run maestro test commands. Then I switched to do some testing on Android device, so I quit my iOS simulator, ran maestro test something.flow with Android device connected and it would give me this error.

Shutting down the maestro studio session on the other terminal solved my problem.

rahimrahman avatar Dec 31 '23 15:12 rahimrahman

Tip: Maestro Studio can now run simultaneously alongside other Maestro CLI commands!

And that exactly what happened to me. I had maestro studio connected on my iOS simulator on a different terminal window and used a different terminal to run maestro test commands. Then I switched to do some testing on Android device, so I quit my iOS simulator, ran maestro test something.flow with Android device connected and it would give me this error.

Shutting down the maestro studio session on the other terminal solved my problem.

thank you

chiefchief avatar Jun 30 '24 13:06 chiefchief

Hey, does this issue occur anymore? From v1.30.1, it should be possible to run maestro studio and maestro test simultaneously.

There are no recent reports and the 👍 count is low as well, so maybe it doesn't occur anymore.

bartekpacia avatar Aug 15 '24 12:08 bartekpacia

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it.

Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. When creating a new issue, please make sure to diligently fill out the issue template.

Thank you for your contribution to our open-source community!

github-actions[bot] avatar Aug 29 '24 18:08 github-actions[bot]

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 Sep 05 '24 18:09 github-actions[bot]