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

Better error handling #216

Open
ztamizzen opened this issue Apr 4, 2023 · 5 comments
Open

Better error handling #216

ztamizzen opened this issue Apr 4, 2023 · 5 comments

Comments

@ztamizzen
Copy link

ztamizzen commented Apr 4, 2023

Description of the feature

When running eas update --auto (or with other parameters) and expo-version has NOT been specified the script will ask for it to be installed. Then this happens:

2023-04-03T11:28:19.5843952Z [expo-cli] This command requires Expo CLI.
2023-04-03T11:28:19.5844707Z - Exporting...
2023-04-03T11:28:19.5862252Z [expo-cli] Do you want to install it globally [Y/n]?
2023-04-03T11:28:19.5863681Z - Exporting...
2023-04-03T17:27:43.6294933Z ##[error]The operation was canceled.

If you check the times you'll see that the script stops running after GitHub times it out after 6h This is not ideal.

Motivation

GitHub Actions are not free and a quicker exit of the script would be prefereable.

Additional context

I didn't do anything special other than what is in the examples. And the example specifies expo-version for when using the preview build but it's also necessary when preview is not used, it seems.

@byCedric
Copy link
Member

byCedric commented Apr 5, 2023

Hi! Can you provide a reproducible example of this? This warning should only be for already deprecated SDK versions, since we moved over to the CLI within the expo package (npx expo <command>).

@ztamizzen
Copy link
Author

ztamizzen commented Apr 11, 2023

Of course, the problem occurs when I don't add expo-version to the configuration

- name: 🐾 Setup EAS
        uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          packager: npm
          token: ${{ secrets.EXPO_TOKEN }}

If I add expo-version everything works fine,

I'd like a shorter timeout than letting the entire action timeout (after 6h). Or that the action detects interaction (Y/n) and either fails or answers Y (if --non-interactive is chosen).
I didn't realize what the issue was because the documentation states "skips when omitted" and I assumed it wasn't strictly necessary.

I'm running eas build --non-interactive --platform ios as the next step.

@byCedric
Copy link
Member

Ah, what Expo SDK are you using? Is it older than SDK 45? Since SDK 45, we ship a newer version of the Expo CLI inside the expo package. That might be why it's blocked on that, even though it should just continue since it's in a CI environment.

If that's the case, one thing we could add is an SDK version check. Basically, "when older than SDK 45, enforce expo-version being set".

@ztamizzen
Copy link
Author

I'm using SDK 45 (v45.0.8 according to package-lock.json).
If it's outside of you control there isn't much to do but then the docs should probably reflect that.
Maybe add a comment about it? 🤔

@ztamizzen
Copy link
Author

I'm confusing myself, the issue arose when I was running update / preview, not when running build and submit.
Anyway, adding it to FAQ could be a good idea: "If the action takes to long make sure that expo-version is configured"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants