Open lkeijmel opened 1 year ago
One instance in which I see this is if certificate verification of the GitHub Enterprise Server fails. We use a custom CA and if we fail to set $NODE_EXTRA_CA_CERTS
then we see this error rather than the "certificate verify failed" that we would expect.
Do you happen to have any news or a workaround for this issue?
I'm using the actions toolkit to get an OIDC token for my action, and every once in a while, I get this exact issue.
Error message: Cannot read properties of undefined (reading 'message').
Any ideas on how eliminate it?
would a retry fix it? and if so, can we add it directly to the getIDToken function?
For reference, here is my code:
- name: Get OIDC Token
uses: actions/github-script@v6
id: get-oidc-token-from-github
with:
script: |
const actionCore = require('@actions/core');
const { execSync } = require('child_process');
(async () => {
try {
const OIDC_TOKEN = await actionCore.getIDToken();
actionCore.setOutput('OIDC_TOKEN', OIDC_TOKEN);
} catch (error) {
actionCore.error('Failed to get OIDC Token from GitHub servers: ' + error + '\n');
execSync('exit 100');
}
})();
Thanks!
@Moshikol we ended up implementing retry behavior in aws-actions/configure-aws-credentials
. I don't maintain that action anymore, but it seemed to have worked fine at the time
Describe the bug It's related to a error raised in https://github.com/aws-actions/configure-aws-credentials/issues/395 where the OIDC client seems to throw an error which seems to be undefined somehow. We've tracked it down to the
getIDToken
function where it catches an error and rethrow it, see my comment on https://github.com/aws-actions/configure-aws-credentials/issues/395#issuecomment-1600275819The strange thing is that it doesn't happen all the time so it's also hard to reproduce or pinpoint it further.
To Reproduce Steps to reproduce the behavior:
aws-actions/configure-aws-credentials
Expected behavior No error or a clear one
Screenshots / code
Referencing to this code: