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

EAS BUG : --auto-submit and --json don't work together as expected #2044

Closed
LeoAnt02 opened this issue Sep 4, 2023 · 3 comments
Closed

EAS BUG : --auto-submit and --json don't work together as expected #2044

LeoAnt02 opened this issue Sep 4, 2023 · 3 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@LeoAnt02
Copy link

LeoAnt02 commented Sep 4, 2023

Build/Submit details page URL

No response

Summary

When using the --auto-submit with --json flag for the build process, the output JSON is not generated as expected

Do not work as expected artifact URL is NOT present in JSON :
eas build -p ios --profile production --non-interactive --auto-submit --json

Work as expected artifact URL is present in JSON:
eas build -p ios --profile production --non-interactive --json

Managed or bare?

Managed

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.6
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
Managers:
CocoaPods: 1.12.0 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10671973
Xcode: 14.0/14A309 - /usr/bin/xcodebuild
npmPackages:
@expo/webpack-config: ^0.17.4 => 0.17.4
expo: ~49.0.6 => 49.0.6
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.72.3 => 0.72.3
react-native-web: ~0.19.7 => 0.19.7
Expo Workflow: bare

Error output

json url=null

Reproducible demo or steps to reproduce from a blank project

eas build -p ios --profile production --non-interactive --auto-submit --json

eas build -p ios --profile production --non-interactive --json

@LeoAnt02 LeoAnt02 added the needs review Issue is ready to be reviewed by a maintainer label Sep 4, 2023
@GuillaumeD-dougs
Copy link

Same problem here.

@GuillaumeD-dougs
Copy link

@LeoAnt02

I dodged the problem by retrieving the buildUrl with the EAS build:list command after the build was done.

So, first you make the build with:

eas build -p ios --profile production --non-interactive --auto-submit

Then, you get the info json from the previous build:

eas build:list --platform=ios --buildProfile=production --status=finished --limit=1 --json --non-interactive

And, for example, if you need to do that in a bash script like me, you can do that:

BUILD_INFO=$(eas build:list --platform=ios --buildProfile=production --status=finished --limit=1 --json --non-interactive)
echo $BUILD_INFO
BUILD_URL=$(echo $BUILD_INFO | grep -o '"buildUrl": "[^"]*' | grep -o '[^"]*$')
echo $BUILD_URL

I hope this helps

@LeoAnt02
Copy link
Author

LeoAnt02 commented Jan 5, 2024

@GuillaumeD-dougs

We ended up with something similar using jq and more variables for debugging purposes

sudo apt-get install -y jq
BUILD_OUTPUT_JSON=$(eas build -p android --profile production --non-interactive --auto-submit --json)
BUILD_OUTPUT_ID=$(echo $BUILD_OUTPUT_JSON | jq -r '.[0].id')
BUILD_OUTPUT_INFO=$(eas build:view $BUILD_OUTPUT_ID --json)
BUILD_OUTPUT_URL=$(echo $BUILD_OUTPUT_INFO | jq -r '.artifacts.buildUrl')

this allow us to not depend on build order, since we have concurrent build at the same time, and always retrieve the url based on the ID

using

eas build:view $ID --json

Hope this helps anyone trying to achieve the same result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants