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

GITHUB_TOKEN is invalidated after time window causing action to fail #12

Closed
CryZe opened this issue Sep 12, 2019 · 16 comments
Closed

GITHUB_TOKEN is invalidated after time window causing action to fail #12

CryZe opened this issue Sep 12, 2019 · 16 comments

Comments

@CryZe
Copy link

CryZe commented Sep 12, 2019

On Windows runners this fails with:

Run softprops/action-gh-release@v1
   with:
    files: livesplit-core-*.*
  env:
    GITHUB_TOKEN: ***
⚠️ Unexpected error fetching GitHub release for tag refs/tags/v-testing: HttpError: Bad credentials
##[error]Bad credentials
##[error]Node run failed with exit code 1
@CryZe
Copy link
Author

CryZe commented Sep 12, 2019

I wouldn't be surprised if Windows runners just have bad credentials or something and it has nothing to do with this action. GitHub Actions seems to have a ton of bugs like that.

@CryZe
Copy link
Author

CryZe commented Sep 12, 2019

Actually, it looks like sometimes for some Windows runners it actually seems to work. So I really don't know what's going on here. Maybe the credentials get invalidated after a while and the jobs are too slow?

@softprops
Copy link
Owner

Hrm, I that might be something I can bring up with GitHub support. It seems plausible these are time limited tokens.

I'll follow up with support. In the meantime can you link me to some example workflow runs where I can point to some example in case they need it

@softprops
Copy link
Owner

Wanted to capture this here for my own reference. Workflow runs should be able for up to 6 hours according to the docs so in theory if tokens were time limited, they would at least be valid for that long

@softprops
Copy link
Owner

Not sure if this link will be accessible to you but in case it is, here's where I'm following up with customer support

https://github.community/t5/GitHub-Actions/GITHUB-TOKEN-is-sometimes-invalid-on-windows-virtual-hosts/m-p/31594#M835

@softprops
Copy link
Owner

There's a bit of information on the provided GITHUB_TOKEN here but nothing that suggests a time limit

@CryZe
Copy link
Author

CryZe commented Sep 13, 2019

I actually just saw that sometimes even the checkout action fails on Windows with a 401 Unauthorized in a very similar manner:
https://github.com/CryZe/livesplit-core/runs/220191711

So I'm thinking there's some general network problem on those runners.

@softprops
Copy link
Owner

Now that is weird I can't speak to that but I can pass the info along to gh support.

Out of curiosity have you seen this happen on any other os but windows?

@CryZe
Copy link
Author

CryZe commented Sep 13, 2019

No, only on Windows. I've reordered the Windows runners to run earlier now, and so far it's working.

@softprops
Copy link
Owner

I'll report back here with what il learn from GitHub's support

@CryZe
Copy link
Author

CryZe commented Sep 14, 2019

The 401 seems to affect the Linux and macOS runners too. It basically seems to start happening towards the later jobs and then all the remaining jobs error out. So it looks very much like some token expiring. But that's after like 30 minutes or so, which is way too early for this to happen.

@softprops
Copy link
Owner

Following up. Support staff have confirmed these tokens are time limited but have not yet confirmed for how long - https://github.community/t5/GitHub-Actions/GITHUB-TOKEN-is-sometimes-invalid-on-windows-virtual-hosts/m-p/31645/highlight/true#M848

Thanks for adding the extra info about 30 minute range and note that other virtual host os's are affected. I'm going to update the title of this gh issue to reflect what we believe to be the issue to avoid advertising this action doesn't work with window runners when it does.

@softprops softprops changed the title This action doesn't work on Windows runners GITHUB_TOKEN is invalidated after time window causing action to fail Sep 14, 2019
@softprops
Copy link
Owner

@CryZe I got some helpful feedback from GitHub's support staff

It looks like this is happening because of the number of workflows being queued, it's being rate limited. We have a fix for this being deployed today.

This looked like a defect on GitHub's end but they may have launched a fix.

If it wouldn't be any trouble, could you give this another spin. Sorry to take up any more of your time.

@ethomson
Copy link

If it wouldn't be any trouble, could you give this another spin. Sorry to take up any more of your time.

Yes, please. We think we've fixed this but let us know if not! Thanks!

@CryZe
Copy link
Author

CryZe commented Sep 20, 2019

I didn't have much time to test it yet. But from the few runs I've done since then, I didn't have any network errors yet. So this may indeed be resolved :)

@softprops
Copy link
Owner

I'm going to close this issue. I don't think it was related to this action but was hand information for me to have an easy link to track

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

No branches or pull requests

3 participants