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

Studio and flow cannot be run at the same time #2188

Open
1 task done
jreimone opened this issue Dec 13, 2024 · 4 comments
Open
1 task done

Studio and flow cannot be run at the same time #2188

jreimone opened this issue Dec 13, 2024 · 4 comments
Labels
bug Something isn't working Maestro

Comments

@jreimone
Copy link

Is there an existing issue for this?

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

Steps to reproduce

I cannot run the Maestro Studio and a test flow against an Android Emulator app at the same time on MacOs. But I could run the test flow when I closed the Studio.

Actual results

Test Flow fails with the launch command:

Running on emulator-5554                  
                                          
 ║                                        
 ║  > Flow: android-flow                  
 ║                                        
 ║    ❌   Launch app "org.wikipedia"     
 ║                                        
                                          
Unable to launch app org.wikipedia: null

==== Debug output (logs & screenshots) ====

Expected results

I can run the Studio and the test at the same time.

About app

Downloaded with maestro download-samples and used sample.apk

About environment

MacOS Sequoia 15.1.1 with

java --version
openjdk 17.0.13 2024-10-15 LTS

Logs

Logs
maestro.log
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ 14:21:27.362 [ INFO] MAESTRO.logSystemInfo: ---- System Info ----
   2   │ 14:21:27.363 [ INFO] MAESTRO.logSystemInfo: Maestro Version: 1.39.4
   3   │ 14:21:27.364 [ INFO] MAESTRO.logSystemInfo: CI: Undefined
   4   │ 14:21:27.364 [ INFO] MAESTRO.logSystemInfo: OS Name: Mac OS X
   5   │ 14:21:27.364 [ INFO] MAESTRO.logSystemInfo: OS Version: 15.1.1
   6   │ 14:21:27.364 [ INFO] MAESTRO.logSystemInfo: Architecture: aarch64
   7   │ 14:21:27.364 [ INFO] MAESTRO.logSystemInfo: Java Version: 17
   8   │ 14:21:27.611 [DEBUG] io.micrometer.common.util.internal.logging.InternalLoggerFactory.newDefaultFactory: Using SLF4J as the default logging framework
   9   │ 14:21:28.038 [ INFO] MAESTRO.logSystemInfo: Xcode Version: 16.2
  10   │ 14:21:28.043 [ INFO] MAESTRO.logSystemInfo: Flutter Version: Undefined
  11   │ 14:21:28.047 [ INFO] MAESTRO.logSystemInfo: Flutter Channel: Undefined
  12   │ 14:21:28.047 [ INFO] MAESTRO.logSystemInfo: ---------------------
  13   │ 14:21:28.682 [ INFO] maestro.cli.command.TestCommand.runShardSuite: [shard 1] Selected device emulator-5554 using port 7001
  14   │ 14:21:29.102 [ INFO] maestro.Maestro.invoke: Getting device info
  15   │ 14:21:29.206 [ INFO] maestro.Maestro.invoke: Got device info: DeviceInfo(platform=ANDROID, widthPixels=1080, heightPixels=2424, widthGrid=1080, heightGrid=2424)
  16   │ 14:21:29.260 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Define variables RUNNING
  17   │ 14:21:29.261 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Define variables metadata CommandMetadata(numberOfRuns=null, evaluatedCommand=MaestroCommand(defineVariablesCommand=DefineVariablesCommand(env={MAESTRO_CLI_AI_KEY=<myKey>, MAESTRO_CLI_AI_MODEL=<myModel>, MAESTRO_FILENAME=android-flow}, la
       │ bel=null, optional=false)), logMessages=[], insight=Insight(message=, level=NONE), action=null)
  18   │ 14:21:29.263 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Define variables COMPLETED
  19   │ 14:21:29.263 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Apply configuration RUNNING
  20   │ 14:21:29.263 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Apply configuration metadata CommandMetadata(numberOfRuns=null, evaluatedCommand=MaestroCommand(applyConfigurationCommand=ApplyConfigurationCommand(config=MaestroCo
       │ nfig(appId=org.wikipedia, name=null, tags=[android, passing], ext={}, onFlowStart=null, onFlowComplete=null), label=null, optional=false)), logMessages=[], insight=Insight(message=, level=NONE), action=null)
  21   │ 14:21:29.264 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Apply configuration COMPLETED
  22   │ 14:21:29.264 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Launch app "org.wikipedia" RUNNING
  23   │ 14:21:29.264 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Launch app "org.wikipedia" metadata CommandMetadata(numberOfRuns=null, evaluatedCommand=MaestroCommand(launchAppCommand=LaunchAppCommand(appId=org.wikipedia, clearS
       │ tate=null, clearKeychain=null, stopApp=null, permissions=null, launchArguments=null, label=null, optional=false)), logMessages=[], insight=Insight(message=, level=NONE), action=null)
  24   │ 14:21:29.590 [ INFO] maestro.Maestro.launchApp: Launching app org.wikipedia
  25   │ 14:21:34.620 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
  26   │ 14:21:34.622 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
  27   │ 14:21:36.752 [ INFO] maestro.cli.runner.MaestroCommandRunner.invoke: Launch app "org.wikipedia" FAILED

Maestro version

1.39.4

How did you install Maestro?

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

Anything else?

No response

Copy link

linear bot commented Dec 13, 2024

@jreimone jreimone changed the title Studio an flow cannot be run at the same time Studio and flow cannot be run at the same time Dec 13, 2024
@Fishbowler
Copy link
Contributor

This normally comes down to resources. Maestro uses a 'chatty' protocol, and polls often. On some machines or some destinations, it's not sustainable to run concurrently.

That being said, that error of simply null isn't very good. I'd expect to see an error about a driver timeout or similar.

@Fishbowler Fishbowler added bug Something isn't working Maestro labels Jan 3, 2025
@jreimone
Copy link
Author

jreimone commented Jan 7, 2025

Thanks for your response @Fishbowler. Can I do something more to workaround this? Or can I support here to investigate it further (can you reproduce it)?

@tlow92
Copy link

tlow92 commented Jan 14, 2025

@Fishbowler I also have this issue. I my opinion it's very easy to reproduce like this:

(btw. this is my common workflow for creating new tests, that's why it's a bit annoying for me)

  1. Start maestro in continuous mode maestro test newTest.yaml -c
  2. Let maestro "finish" running the current file. Maestro is waiting in continuous mode until you save the file.
  3. In separate terminal run maestro studio to check some id's are other locators
  4. close maestro studio again (btw. by now maestro studio is already returning a infinite loop of errors in terminal)
  5. save test file to continue with writing test
  6. maestro process hangs and doesn't run anymore

In my case it's not about being able to run maestro commands from two terminals at the same time. It's just about being able to write a test in continuous mode and being able to use maestro studio to find locators. I understand that technically the problem is that two instances of maestro are run at the same time.

I hope my input helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Maestro
Projects
None yet
Development

No branches or pull requests

3 participants