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 bitbucket pipeline fails with Android #1612

Closed
AlexGuiraoLopez opened this issue Dec 4, 2023 · 13 comments
Closed

Maestro bitbucket pipeline fails with Android #1612

AlexGuiraoLopez opened this issue Dec 4, 2023 · 13 comments
Labels
bug Something isn't working needs more info The issue seems valid, but more information is needed to pinpoint the cause

Comments

@AlexGuiraoLopez
Copy link

AlexGuiraoLopez commented Dec 4, 2023

Describe the bug
I'm using Maestro with Bitbucket pipeline for the first time with an Android project. I set all the steps from documentation but when pipeline executes it seems to fail for some reason.
Installation was successful! message appear and some instructions of how to use maestro but it doesn't execute the tests.

To Reproduce
Steps to reproduce:

  1. Prepare the YAML file for bitbucket as in Maestro documentation:
    pipelines:
    default:
    • step:
      name: Android Debug Application
      caches: # caching speed up subsequent execution
      - gradle
      script:
      - ./gradlew assembleStgDebug
      artifacts:
      - app/build/outputs/** # artifacts are files that are produced by a step
    • step:
      name: Maestro UI test
      script:
      - pipe: mobiledevinc/maestro-cloud-upload:1.2.0 # maestro UI testing.
      variables:
      MDEV_API_KEY: $MAESTRO_TOKEN
      MDEV_APP_FILE: app/build/outputs/apk/stg/debug/app-stg-debug.apk
  2. Push to Bitbucket
  3. The Flow fails at pipeline execution

Expected behavior
Run Maestro test and receive its response.

Screenshots
yaml bitbucket pipelinebitbucket response

Environment information (please complete the following information):

  • Maestro version mobiledevinc/maestro-cloud-upload:1.2.0
  • Platform: Android 12
  • Framework: Android
  • Simulator
  • Host Bitbucket pipeline

**Bugreport output:
pipelineLog-{60b3e6c3-879c-4550-b829-57b8b758f199}.txt

@AlexGuiraoLopez AlexGuiraoLopez added the bug Something isn't working label Dec 4, 2023
@axelniklasson
Copy link
Contributor

@AlexGuiraoLopez could you post the full output of the log from BitBucket please?

@axelniklasson axelniklasson added the needs more info The issue seems valid, but more information is needed to pinpoint the cause label Dec 5, 2023
@AlexGuiraoLopez
Copy link
Author

AlexGuiraoLopez commented Dec 5, 2023

@AlexGuiraoLopez could you post the full output of the log from BitBucket please?

pipelineLog-{60b3e6c3-879c-4550-b829-57b8b758f199}.txt

@axelniklasson
Copy link
Contributor

Thanks. Looks like the upload pipe can't find your Flows. Is your workspace present in the root directory of your repo and called .maestro? Otherwise you need to set MDEV_WORKSPACE with the path to your workspace as outlined in the docs.

@AlexGuiraoLopez
Copy link
Author

Yes, my .maestro folder is located in android project root directory and tests inside:
Captura de pantalla 2023-12-11 a las 9 32 18

@axelniklasson
Copy link
Contributor

axelniklasson commented Dec 11, 2023

android project root directory

Is this the same as the root directory of your repository or do you have a monorepo with multiple projects in the same repository? If so you need to set MDEV_WORKSPACE to <ANDROID_PROJECT_folder>/.maestro

@AlexGuiraoLopez
Copy link
Author

Is the root of the bitbucket repository too.

@axelniklasson
Copy link
Contributor

Got it, thanks. Passing this to @ArthurSav who has more context on our Bitbucket pipelines -- Arthur, can you please help out here?

@SimenRom
Copy link

SimenRom commented Dec 12, 2023

Got the same issue now when im executing with maestro cloud-command from the CI. Worked perfectly fine for 1 or 2 weeks ago.

@AlexGuiraoLopez
Copy link
Author

AlexGuiraoLopez commented Jan 15, 2024

Any news about this issue? @axelniklasson @ArthurSav

@ArthurSav
Copy link
Contributor

ArthurSav commented Jan 18, 2024

@AlexGuiraoLopez Can you set the workspace path explicitly? You can do this like so:

script:
  - pipe: mobiledevinc/maestro-cloud-upload:1.2.0
    variables:
      MDEV_API_KEY: "<string>"
      MDEV_APP_FILE: "<string>"
      MDEV_WORKSPACE: .maestro (or path to wherever the workspace folder is located)

If that doesn't work, please post the full pipe output again.

Also, I think you're using an older version of the pipe

@AlexGuiraoLopez
Copy link
Author

I've tried to specify workspace and now I get different error:

Welcome to Maestro!
+ export PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.maestro/bin
+ [ ! -z  ]
+ maestro cloud --apiKey $MAESTRO_TOKEN --branch composing/ui_migration_to_compose --repoName iatiapp_android --name 279 app/build/outputs/apk/stg/debug/app-stg-debug.apk .maestro
Evaluating workspace...
Uploading Flow(s)...
....................
Upload request failed (400): Workspace doesn't have any flow

@bartekpacia
Copy link
Contributor

Hey, revisiting this to say this doesn't look like a Maestro-related problem, but BitBucket Pipelines specific.

Because of that, closing. Try creating a minimal, reproducible example and asking BitBucket support or StackOverflow.

@bartekpacia bartekpacia closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2024
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 needs more info The issue seems valid, but more information is needed to pinpoint the cause
Projects
None yet
Development

No branches or pull requests

5 participants