tilfinltd / aws-extend-switch-roles

Extend your AWS IAM switching roles by Chrome extension, Firefox add-on, or Edge add-on
https://chromewebstore.google.com/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl?utm_source=github
MIT License
1.32k stars 141 forks source link

Failure to save configuration #223

Closed m-koops closed 2 years ago

m-koops commented 2 years ago

When I tried to save my changed configuration, I got the failure "Failed to save because duplicate definition of profile". Toggling between sync and local did not change anything.

At some point I decided to empty the configuration box and save that. That worked!

But since then any attempt to save my config fails again with the before-mentioned message. Effective, my extension is now with empty config and no way to save config.

Removing and re-installing the chrome extension did not help.

Extension: 2.2.0 Chrome: 95.0.4638.69 (Official Build) (64-bit) on Ubuntu 20.04

How can I reset the state of the extension?

tilfin commented 2 years ago

AESR became to validate the configuration strictly since v2.1.0.

Failed to save because duplicate definition of profile

This message indicates that the same profile name is included, as shown below.

[foo]
aws_account_id = 123456780000

[foo]
aws_account_id = 123456781111

@m-koops Please review your configuration again.

m-koops commented 2 years ago

Thank you for your prompt reply. I have tested some more, starting with empty config and adding the entries 1-by-1 just to see which one was breaking the validation.

The AESR is behaving slightly different then you suggested: adding 2 exact equal sections like [profile xxxxxx] (with same properties) did not fail the validation. The 2 profiles just show up in the extension.

But what made my config break was the entry: [default] profile = xxxxxxx

For now I just left that section out of my config.

tilfin commented 2 years ago

Please delete default section.

[default]
profile = xxxxxxx

You cannot define it in AESR configuration. AESR configuration is only similar to ~/.aws/config, not the same specification.