Closed colesiegel closed 1 year ago
@all-contributors please add @colesiegel for bugs
@ryansonshine
I've put up a pull request to add @colesiegel! :tada:
:tada: This issue has been resolved in version 1.8.17 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thanks for the detailed bug report, @colesiegel!
ssocreds was working well for me for the past few months but today when I attempt to run it, I receive errors about session token not found or invalid
It's hard to say what exactly was going on but if I were to hazard a guess I'd think something in your config or credentials file were invalid. The course you took with clearing out the credentials and cache then recreating is the easiest path to resolution.
Any suggestions as to what could have caused this, or how to properly resolve it?
It looks like you have a file in your ~/.aws/sso/cache
directory that contains invalid json but ssocreds
still ends up finding the credentials while iterating through the cache files. I've put in a fix that should avoid reading the files containing invalid JSON.
Please update to the latest version (v1.8.17) with the following command and feel free to reopen if the issue persists:
npm install -g aws-sso-creds-helper@latest
Cheers @ryansonshine I figured the first issue would be difficult to nail down, but at least we've got a simple resolution.
I got latest version and I don't have the invalid json error anymore, thanks a lot.
➜ ~ ssocreds --version
1.8.17
➜ ~ ssocreds --profile dev
[aws-sso-creds-helper]: AWS SSO Creds Helper v1.8.17
[aws-sso-creds-helper]: Getting SSO credentials for profile dev
[aws-sso-creds-helper]: Successfully loaded SSO credentials for profile dev
➜ ~ ssocreds --profile default
[aws-sso-creds-helper]: AWS SSO Creds Helper v1.8.17
[aws-sso-creds-helper]: Getting SSO credentials for profile default
[aws-sso-creds-helper]: Successfully loaded SSO credentials for profile default
ssocreds was working well for me for the past few months but today when I attempt to run it, I receive errors about
session token not found or invalid
.I confirmed that the aws profile I am using has active credentials as I was able to perform AWS CLI commands. This error occurs for both existing AWS profiles and ones which I have newly added.
To resolve the issue, I had to delete my
~/.aws/credentials
entries as well as the contents of~/.aws/sso/cache
. After adding the profiles back, I am now able to run ssocreds successfully and use the SDK, although there is a message about invalid JSON.Any suggestions as to what could have caused this, or how to properly resolve it? As far as I can see nothing changed recently in this library. Given the AWS profile / SSO process itself is working without issue, I am not sure why ssocreds suddenly fails to retrieve the token. Does the invalid JSON message indicate some other issue?
Environment