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

Open
mattrlong opened this issue Apr 2, 2024 · 0 comments
Labels
bug Something isn't working

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

Workspace (if applicable)
Please share your workspace with Flow files and application binary if you are able to do so as that greatly helps in reproduction efforts.

Bugreport output (if applicable)
The zip files created when maestro bugreport can be uploaded here as well if applicable.

Additional context
Add any other context about the problem here.

@mattrlong mattrlong added the bug Something isn't working label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant