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

Improve error messaging #282

Closed
richardhboyd opened this issue Oct 6, 2021 · 12 comments
Closed

Improve error messaging #282

richardhboyd opened this issue Oct 6, 2021 · 12 comments
Labels
effort/large This issue will take more than a week of effort to fix feature-request A feature should be added or improved. management/tracking This issue consists of smaller, related issues to work on p1

Comments

@richardhboyd
Copy link
Contributor

Currently any number of failures result in Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers which isn't terribly helpful. We should better surface error messages for:

  • the workflow not having the correct permissions
  • IAM refusing to grant credentials for a token
  • others?
@andrewlytle
Copy link

Richard, is there any form of debug logging currently? I've got this working in one repository, but it fails in another repository using the same OIDC provider and an identical role. As you mentioned I just get Could not load credentials from any providers which doesn't help much.

@richardhboyd
Copy link
Contributor Author

Did you update the Role's condition on the trust policy to allow the second repository as well?

@andrewlytle
Copy link

I created a whole new role for each repository. The only thing funky about this repo I can think of is that I moved it from my personal org to my company org, but I've tried both names and even removed the Condition entirely. I've probably done something dumb, but there's just no path to debug right now.

@jazanne
Copy link

jazanne commented Dec 6, 2021

I see the error fairly frequently in one of my repos - it's intermittent and rerunning a workflow will generally work / not produce this error. However, having this pop up as often as it does slows down my CI/CD process. I'd love more info on what's causing it and why it only happens sometimes, but not consistenly.

@jtheuer
Copy link

jtheuer commented Apr 22, 2022

same here, got Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers and would really like to know where to start looking.

Any chance the error messages / logs are improved?

@peterwoodworth peterwoodworth added needs-triage This issue still needs to be triaged feature-request A feature should be added or improved. p1 effort/large This issue will take more than a week of effort to fix and removed needs-triage This issue still needs to be triaged labels Oct 4, 2022
@peterwoodworth
Copy link
Contributor

We should absolutely improve error messaging. I'll try to update this thread with the errors I and others come across that are unclear

@peterwoodworth peterwoodworth added the management/tracking This issue consists of smaller, related issues to work on label Oct 7, 2022
@astropanic
Copy link

Any updates here?

I have a job on a self hosted runner, on one container it runs smoothly, on another I'm getting: Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers

If the error message would be more specific, I could tell where the problem resides.

@peterwoodworth
Copy link
Contributor

The error messaging will be improved upon in v3, however I can't yet give a date for when that will be available.

@astropanic feel free to submit a new issue or discussion with further details including your workflow files

@blimmer
Copy link

blimmer commented Aug 14, 2023

For me, it was because I missed adding the id-token permission, which is in the README, I just missed it:

# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read

Leaving this note here for future travelers.

@jwalton
Copy link

jwalton commented Aug 15, 2023

For me, every time it's because I forget to add the permissions token. :P It would be nice if the error message told you to check this.

@peterwoodworth
Copy link
Contributor

Error messaging and our docs should be improved overall for this action in v3. Please open any issues if you encounter any error messages that are unclear.

@github-actions
Copy link

** Note **
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/large This issue will take more than a week of effort to fix feature-request A feature should be added or improved. management/tracking This issue consists of smaller, related issues to work on p1
Projects
None yet
Development

No branches or pull requests

8 participants