Code Monkey home page Code Monkey logo

Comments (3)

bartekpacia avatar bartekpacia commented on September 2, 2024

Hey @pplourde, can you show exact commands you used, and also the flow file?

My repro

I reproduce this issue, but with different logs/errors. I'm curious why's that. This is my flow:

# file: samples/android-flow.yaml
appId: org.wikipedia
---
- launchApp:
    clearState: true
- tapOn: CONTINUE
  • wikipedia app is, of course, installed on my Android emulator
  • Maestro v1.37.9

First I run:

maestro studio

Then in a new terminal tab:

maestro test samples/android-flow.yaml

Terminal logs:

$ maestro test samples/android-flow.yaml
\
Running on emulator-5554

 ║
 ║  > Flow
 ║
 ║    ❌  Launch app "org.wikipedia" with clear state
 ║    🔲 Tap on "CONTINUE"
 ║

Unable to launch app org.wikipedia: null

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

/Users/bartek/.maestro/tests/2024-08-21_113614
maestro.log
[INFO ] MAESTRO - ---- System Info ----
[INFO ] MAESTRO - Maestro Version: 1.37.9
[INFO ] MAESTRO - CI: Undefined
[INFO ] MAESTRO - OS Name: Mac OS X
[INFO ] MAESTRO - OS Version: 14.5
[INFO ] MAESTRO - Architecture: aarch64
[INFO ] MAESTRO - Java Version: 17
[INFO ] MAESTRO - Xcode Version: 15.4
[INFO ] MAESTRO - Flutter Version: 3.22.0
[INFO ] MAESTRO - Flutter Channel: stable
[INFO ] MAESTRO - ---------------------
[INFO ] maestro.Maestro - Getting device info
[INFO ] m.cli.runner.MaestroCommandRunner - Apply configuration RUNNING
[INFO ] m.cli.runner.MaestroCommandRunner - Apply configuration metadata CommandMetadata(numberOfRuns=null, evaluatedCommand=MaestroCommand(tapOnElement=null, tapOnPoint=null, tapOnPointV2Command=null, scrollCommand=null, swipeCommand=null, backPressCommand=null, assertCommand=null, assertConditionCommand=null, inputTextCommand=null, inputRandomTextCommand=null, launchAppCommand=null, applyConfigurationCommand=ApplyConfigurationCommand(config=MaestroConfig(appId=org.wikipedia, name=null, tags=[], initFlow=null, ext={}, onFlowStart=null, onFlowComplete=null), label=null), openLinkCommand=null, pressKeyCommand=null, eraseTextCommand=null, hideKeyboardCommand=null, takeScreenshotCommand=null, stopAppCommand=null, killAppCommand=null, clearStateCommand=null, clearKeychainCommand=null, runFlowCommand=null, setLocationCommand=null, repeatCommand=null, copyTextCommand=null, pasteTextCommand=null, defineVariablesCommand=null, runScriptCommand=null, waitForAnimationToEndCommand=null, evalScriptCommand=null, scrollUntilVisible=null, travelCommand=null, startRecordingCommand=null, stopRecordingCommand=null, addMediaCommand=null, setAirplaneModeCommand=null, toggleAirplaneModeCommand=null), logMessages=[], insight=Insight(message=, level=NONE))
[INFO ] m.cli.runner.MaestroCommandRunner - Apply configuration COMPLETED
[INFO ] m.cli.runner.MaestroCommandRunner - Launch app "org.wikipedia" with clear state RUNNING
[INFO ] m.cli.runner.MaestroCommandRunner - Launch app "org.wikipedia" with clear state metadata CommandMetadata(numberOfRuns=null, evaluatedCommand=MaestroCommand(tapOnElement=null, tapOnPoint=null, tapOnPointV2Command=null, scrollCommand=null, swipeCommand=null, backPressCommand=null, assertCommand=null, assertConditionCommand=null, inputTextCommand=null, inputRandomTextCommand=null, launchAppCommand=LaunchAppCommand(appId=org.wikipedia, clearState=true, clearKeychain=null, stopApp=null, permissions=null, launchArguments=null, label=null), applyConfigurationCommand=null, openLinkCommand=null, pressKeyCommand=null, eraseTextCommand=null, hideKeyboardCommand=null, takeScreenshotCommand=null, stopAppCommand=null, killAppCommand=null, clearStateCommand=null, clearKeychainCommand=null, runFlowCommand=null, setLocationCommand=null, repeatCommand=null, copyTextCommand=null, pasteTextCommand=null, defineVariablesCommand=null, runScriptCommand=null, waitForAnimationToEndCommand=null, evalScriptCommand=null, scrollUntilVisible=null, travelCommand=null, startRecordingCommand=null, stopRecordingCommand=null, addMediaCommand=null, setAirplaneModeCommand=null, toggleAirplaneModeCommand=null), logMessages=[], insight=Insight(message=, level=NONE))
[INFO ] maestro.Maestro - Clearing app state org.wikipedia
[INFO ] maestro.Maestro - Launching app org.wikipedia
[INFO ] maestro.Maestro - Taking screenshot: /var/folders/r6/5z0bypqn4cb8p369zlrfhw3c0000gn/T/screenshot-1724236584313799714500118837704.png
[INFO ] maestro.utils.ScreenshotUtils - Taking screenshot to output sink
[INFO ] m.cli.runner.MaestroCommandRunner - Launch app "org.wikipedia" with clear state FAILED

from maestro.

bartekpacia avatar bartekpacia commented on September 2, 2024

Additionally, I also tested on iOS and there's a different bug – Maestro Studio stops working, i.e. the emulator screenshot stops refreshing.

repro:
0. Run iOS simulator (I used iOS 17.5)
0. maestro download-samples

  1. maestro studio
  2. in a new tab maestro test samples/ios-flow.yaml
studio logs
$ maestro studio
Running on iPhone 15 - iOS 17.5 - BCFE83EE-F9A2-4612-B7B4-4CB05CE2406B

╭────────────────────────────────────────────────────────╮
│                                                        │
│   Maestro Studio is running at http://localhost:9999   │
│                                                        │
╰────────────────────────────────────────────────────────╯


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

Navigate to http://localhost:9999 in your browser to open Maestro Studio. Ctrl-C to exit.
java.io.EOFException: Unexpected end of ZLIB input stream
	at java.base/java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:244)
	at org.apache.commons.compress.archivers.zip.InflaterInputStreamWithStatistics.fill(InflaterInputStreamWithStatistics.java:52)
	at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
	at org.apache.commons.compress.archivers.zip.InflaterInputStreamWithStatistics.read(InflaterInputStreamWithStatistics.java:67)
	at org.rauschig.jarchivelib.ZipFileArchiver$ZipFileArchiveInputStream.read(ZipFileArchiver.java:72)
	at java.base/java.io.InputStream.read(InputStream.java:218)
	at org.rauschig.jarchivelib.IOUtils.copy(IOUtils.java:82)
	at org.rauschig.jarchivelib.IOUtils.copy(IOUtils.java:66)
	at org.rauschig.jarchivelib.IOUtils.copy(IOUtils.java:51)
	at org.rauschig.jarchivelib.CommonsArchiver.extract(CommonsArchiver.java:104)
	at org.rauschig.jarchivelib.CommonsArchiver.extract(CommonsArchiver.java:82)
	at xcuitest.installer.LocalXCTestInstaller.extractZipToApp(LocalXCTestInstaller.kt:196)
	at xcuitest.installer.LocalXCTestInstaller.startXCTestRunner(LocalXCTestInstaller.kt:161)
	at xcuitest.installer.LocalXCTestInstaller.start(LocalXCTestInstaller.kt:82)
	at xcuitest.api.NetworkErrorHandler.retryConnection(NetworkErrorHandler.kt:70)
	at xcuitest.XCTestDriverClient.addRetryInterceptor$lambda$8(XCTestDriverClient.kt:329)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
	at xcuitest.XCTestDriverClient.executeJsonRequest(XCTestDriverClient.kt:240)
	at xcuitest.XCTestDriverClient.viewHierarchy(XCTestDriverClient.kt:72)
	at ios.xctest.XCTestIOSDevice$viewHierarchy$1.invoke(XCTestIOSDevice.kt:40)
	at ios.xctest.XCTestIOSDevice$viewHierarchy$1.invoke(XCTestIOSDevice.kt:38)
	at ios.xctest.XCTestIOSDevice.execute(XCTestIOSDevice.kt:227)
	at ios.xctest.XCTestIOSDevice.viewHierarchy(XCTestIOSDevice.kt:38)
	at ios.LocalIOSDevice.viewHierarchy(LocalIOSDevice.kt:47)
	at maestro.drivers.IOSDriver.viewHierarchy(IOSDriver.kt:152)
	at maestro.drivers.IOSDriver.access$viewHierarchy(IOSDriver.kt:41)
	at maestro.drivers.IOSDriver$contentDescriptor$1.invoke(IOSDriver.kt:147)
	at maestro.drivers.IOSDriver$contentDescriptor$1.invoke(IOSDriver.kt:147)
	at maestro.drivers.IOSDriver.runDeviceCall(IOSDriver.kt:499)
	at maestro.drivers.IOSDriver.contentDescriptor(IOSDriver.kt:147)
	at maestro.ViewHierarchy$Companion.from-8JJjmZI(ViewHierarchy.kt:29)
	at maestro.Maestro.viewHierarchy-c1iYVAs(Maestro.kt:422)
	at maestro.Maestro.viewHierarchy-c1iYVAs$default(Maestro.kt:421)
	at maestro.studio.DeviceService.getDeviceScreen(DeviceService.kt:172)
	at maestro.studio.DeviceService.access$getDeviceScreen(DeviceService.kt:43)
	at maestro.studio.DeviceService$routes$3$1.invokeSuspend(DeviceService.kt:82)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)
ℹ️ Retrying connection to the XCUITest server for 1...
Aug 21, 2024 11:47:03 AM okhttp3.internal.platform.Platform log
WARNING: A connection to http://[::1]:22087/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);
ℹ️ Retrying connection to the XCUITest server for 1...
Aug 21, 2024 11:47:25 AM okhttp3.internal.platform.Platform log
WARNING: A connection to http://[::1]:22087/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);
ℹ️ Retrying connection to the XCUITest server for 2...
ℹ️ Retrying connection to the XCUITest server for 2...
Aug 21, 2024 11:47:46 AM okhttp3.internal.platform.Platform log
WARNING: A connection to http://[::1]:22087/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);
Aug 21, 2024 11:47:46 AM okhttp3.internal.platform.Platform log
WARNING: A connection to http://[::1]:22087/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);

from maestro.

ahervieuxgirard avatar ahervieuxgirard commented on September 2, 2024

@bartekpacia Hello i'm the other guy that is working with @pplourde

I simply ran maestro studio first then my script using simple command : maestro test flowb.yml

The flow :

---
appId: com.google.android.youtube

tags:
  - batman
  - robin

---

- launchApp:
    appId: "com.google.android.youtube"

from maestro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.