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

Stacktrace when profiles changed #2309

Closed
mousedownmike opened this issue Dec 24, 2020 · 0 comments
Closed

Stacktrace when profiles changed #2309

mousedownmike opened this issue Dec 24, 2020 · 0 comments
Labels
bug We can reproduce the issue and confirmed it is a bug.

Comments

@mousedownmike
Copy link

Describe the bug
IDEA reports an error attributed to the AWS Toolkit when ~/.aws/config is changed outside of the IDE.

To reproduce

  1. Launch IDEA with the AWS Toolkit and profiles configured in ~/.aws/config and ~/.aws/credentials. (NOTE: this was experienced using profiles with source_profile set.)
  2. Remove one of the profiles from ~/.aws/config
  3. Observe "red exclamation icon" in IDEA status bar.

Expected behavior

No errors

Screenshots

Stack trace available at the end of this issue.

Your Environment

IntelliJ IDEA 2020.3 (Ultimate Edition)
Build #IU-203.5981.155, built on November 30, 2020
Licensed to ----
Subscription is active until June 24, 2021
Runtime version: 11.0.9+11-b1145.21 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-58-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1892M
Cores: 8
Registry: dart.projects.without.pubspec=true
Non-Bundled Plugins: com.intellij.plugins.watcher, org.intellij.plugins.hcl, org.toml.lang, Dart, io.flutter, com.intellij.plugins.html.instantEditing, org.jetbrains.kotlin, intellij.prettierJS, com.dmarcotte.handlebars, aws.toolkit
Current Desktop: ubuntu:GNOME
  • OS: Ubuntu 20.04.1 LTS
  • AWS Toolkit version: 1.22-203

Additional context

Stacktrace (profile names changed):
NOTE: The error says main does not exist when I actually deleted reftools from the ~/.aws/config

java.lang.IllegalArgumentException: Profile 'reftools' references source profile 'main' which does not exist
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileUtilsKt$traverseCredentialChain$1.invokeSuspend(ProfileUtils.kt:26)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:140)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileCredentialProviderFactory.requiresMfa(ProfileCredentialProviderFactory.kt:376)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileCredentialProviderFactory.asId(ProfileCredentialProviderFactory.kt:326)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileCredentialProviderFactory.access$asId(ProfileCredentialProviderFactory.kt:75)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileCredentialProviderFactory$loadProfiles$2.invoke(ProfileCredentialProviderFactory.kt:117)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileCredentialProviderFactory$loadProfiles$2.invoke(ProfileCredentialProviderFactory.kt:75)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
	at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:742)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileCredentialProviderFactory.loadProfiles(ProfileCredentialProviderFactory.kt:117)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileCredentialProviderFactory.access$loadProfiles(ProfileCredentialProviderFactory.kt:75)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileCredentialProviderFactory$setUp$1.invoke(ProfileCredentialProviderFactory.kt:85)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.ProfileCredentialProviderFactory$setUp$1.invoke(ProfileCredentialProviderFactory.kt:75)
	at software.aws.toolkits.jetbrains.core.credentials.profiles.DefaultProfileWatcher$prepareChange$3$afterVfsChange$1.run(ProfileWatcher.kt:73)
	at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
	at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:270)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:834)
@mousedownmike mousedownmike added the bug We can reproduce the issue and confirmed it is a bug. label Dec 24, 2020
@abrooksv abrooksv closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants