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

Maestro stopped asking which device to use when many are running, defaults to the first one #1849

Closed
1 task done
DavidREntwistle opened this issue Jul 30, 2024 · 4 comments · Fixed by #1953
Closed
1 task done
Labels
bug Something isn't working maestro cli Related to the command-line Maestro tool P2 Important and valid issues not at the top of the work list regression-v1.37.x Issue introduced in the 1.37.x release

Comments

@DavidREntwistle
Copy link

DavidREntwistle commented Jul 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues and didn't find mine.

Steps to reproduce

Steps to reproduce:

  1. Open multiple devices e.g. x1 iOS simulator & x1 Android Emulator.
  2. Run the maestro test yourFlow.yaml command.
  3. Observe no Multiple running devices detected. Choose a device to run on. prompt.

Actual results

When I have multiple devices running, I cannot select which device to run the flow on with the maestro test command anymore.

If I have both an iOS simulator and android emulator running and I want to run X flow on the android emulator, I need to close the iOS simulator first, vice versa.

Expected results

When I have multiple devices running, I should be prompted with:

Multiple running devices detected. Choose a device to run on.
Enter a number from the list above:

The maestro studio command still allows this functionality.
I do not require any devices to be closed to run X flow on the correct device.

About app

  • Native iOS & Android app

About environment

  • MacBook Pro M2 Max - 32 GB
  • macOS Sonoma 14.6
  • arm64

Maestro version

1.37.4

How did you install Maestro?

install script (https://get.maestro.mobile.dev)

Anything else?

1.36.0 did not have this issue.
Occurred since 1.37.0 release.

@simon-gilmurray
Copy link

+1

@bartekpacia
Copy link
Contributor

bartekpacia commented Jul 31, 2024

I confirm this issue occurs on (tested on v1.37.4).

I verified this is a regression introduced in #1732 (commit dc1c0fa).

The issue does not occur on the commit right before it: 5f994da

The workaround is to pass the ID of the device that you want to run on. It works when you have multiple devices connected.

maestro \
  --udid emulator-5554 \
  test <my_flow_path

To see device IDs, run:

  • Android: adb devices
  • iOS: xcrun simctl list devices booted

@bartekpacia bartekpacia added bug Something isn't working P2 Important and valid issues not at the top of the work list maestro cli Related to the command-line Maestro tool regression-v1.37.x Issue introduced in the 1.37.x release labels Jul 31, 2024
@bartekpacia bartekpacia changed the title Cannot choose which device to run on when multiple devices are running Maestro stopped asking which device to run when many are running, defaults to the first one Jul 31, 2024
@bartekpacia bartekpacia changed the title Maestro stopped asking which device to run when many are running, defaults to the first one Maestro stopped asking which device to use when many are running, defaults to the first one Jul 31, 2024
@DavidREntwistle
Copy link
Author

DavidREntwistle commented Aug 8, 2024

I've noticed whilst attempting to run a flow on an iOS simulator the error (Unable to launch app xxxxxxxxxxxx: Package xxxxxxxxxxxx is not installed) occurring. This only occurs when I have both an Android emulator and iOS simulator device running and then attempt to run an iOS flow (with iOS specific app id).

I believe this is because it's attempting to launch the iOS specific flow on the Android emulator rather than the iOS simulator.

Fixing this issue should resolve this as when we have multiple devices running, as we should be prompted with:

Multiple running devices detected. Choose a device to run on.
Enter a number from the list above:

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 Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working maestro cli Related to the command-line Maestro tool P2 Important and valid issues not at the top of the work list regression-v1.37.x Issue introduced in the 1.37.x release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants