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 1.36.0] console.log statements not output to terminal from runScript commands within flows #1710

Closed
mattrlong opened this issue Apr 2, 2024 · 3 comments
Labels
bug Something isn't working js Related to JavaScript support maestro cli Related to the command-line Maestro tool

Comments

@mattrlong
Copy link

mattrlong commented Apr 2, 2024

Describe the bug
When executing JavaScript files before a flow is executed, the log statements appear as expected in the terminal, ie:

appId: ${APP_ID}
---
- runScript:
    file: ./script.js

- runFlow: "myFlow.yaml" 

However, if the same file is executed within the flow, ie if myFlow.yaml above were to contain:

appId: ${APP_ID}

---

- launchApp:
    clearState: true
- runScript: 
    file: ./script.js

Any log statements within the scripts do not appear in the terminal.

To Reproduce
Create script.js with below, and replicate using the two options for executing the script above:

// script.js

const myVar = 'foo';
console.log(myVar); // outputs 'foo'
console.log(`myVar is ${myVar}`) // outputs 'myVar is foo'

Expected behavior
console.log output to always appear in the terminal when running flow for debugging purposes.

Screenshots
An example of the difference in output can be seen below, where the script.js is executed once before the flow (with output), and the second during a flow execution:
image

Environment information (please complete the following information):

  • Maestro version v1.36.0
  • Platform: Android 14
  • Framework: Native Android
  • Device model and OS version: Pixel3a
  • Emulator
  • Host Mac M1
  • RhinoJS runtime
@mattrlong mattrlong added the bug Something isn't working label Apr 2, 2024
@bartekpacia bartekpacia added js Related to JavaScript support maestro cli Related to the command-line Maestro tool labels Aug 24, 2024
@bartekpacia
Copy link
Member

Hey, thanks for the issue. I wasn't able to reproduce it. Here's my workspace:

workspace.zip

I run the flow with maestro test maestro_issue_1710/flow.yaml

Tested on Maestro v1.37.9, both Android and iOS.

@bartekpacia bartekpacia closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2024
@bartekpacia
Copy link
Member

Please consider creating new issue and make sure it's reproducible.

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 Aug 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working js Related to JavaScript support maestro cli Related to the command-line Maestro tool
Projects
None yet
Development

No branches or pull requests

2 participants