configure-aws-credentials: Error object is empty breaking action
Action stopped working today, after working for multiple weeks:
runs-on: ubuntu-20.04
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::[REDACTED]:role/[REDACTED]
role-duration-seconds: 3600
aws-region: us-east-1
Error: Error message: Cannot read property 'message' of undefined
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 15
- Comments: 29 (8 by maintainers)
Commits related to this issue
- Introduce some log - insights absolutely missing... - actions fails sporadically with a "message not found" error - currently watching https://github.com/aws-actions/configure-aws-credentials/issue... — committed to meisterplan/configure-aws-credentials by mmuth 2 years ago
- Introduce some log - insights absolutely missing... - actions fails sporadically with a "message not found" error - currently watching https://github.com/aws-actions/configure-aws-credentials/issue... — committed to meisterplan/configure-aws-credentials by mmuth 2 years ago
- Introduce some log - insights absolutely missing... - actions fails sporadically with a "message not found" error - currently watching https://github.com/aws-actions/configure-aws-credentials/issue... — committed to meisterplan/configure-aws-credentials by mmuth 2 years ago
We now implement a retry behavior when the
getIDToken
call fails inv3
, so please let me know if upgrading tov3
helps with this at all.I don’t think this issue is related to the fingerprints issue, this error would occur before it gets a chance to send the request to the IDP if it’s coming from the
getIDToken
call.We’ve implemented the retry and backoff on the
getIDToken
call in the next major version, we’re working towards a release for that.For now I’ve forked this repo, added some additional logging in and around the
getIDToken()
function and use it in our workflows and hopefully we can pinpoint the issue further. Yesterday the workflows didn’t have any issues so it’s waiting for the next incidentI also encountered this today in a workflow that has many parallel jobs that independently authed with AWS successfully - just the one job failed. I suspect that something is being raised in
run()
that doesn’t produce a typicalError
object.I haven’t any information on where this is being thrown from, but have enabled
ACTIONS_STEP_DEBUG
in case I can catch it again.In the meantime, perhaps the team can change the catch-all
core.setFailed(error.message)
call tocore.setFailed(error.toString())
so that the stack trace is emitted.. Alternatively, it could be called with an Error object, since actions/toolkit/core internally callserror.toString()
anyway.Here’s my unhelpful log 😃
I’ve also seen this happen a couple of times today but not consistently. A search (https://github.com/aws-actions/configure-aws-credentials/search?q=message) indicates that this could be an error masking another error?
Edit: Also seeing this when assuming a role via OIDC.