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

Exception occurred attempting to inject region/credentials #5115

Open
minaTafreshi99 opened this issue Nov 21, 2024 · 1 comment
Open

Exception occurred attempting to inject region/credentials #5115

minaTafreshi99 opened this issue Nov 21, 2024 · 1 comment
Labels
guidance General information and guidance, answers to FAQs, or recommended best practices/resources.

Comments

@minaTafreshi99
Copy link

Your Environment

  • OS: macOS 14.7
  • JetBrains product: IntelliJ IDEA (Ultimate Edition)
  • JetBrains product version: 2024.2.3
  • AWS Toolkit version: 3.40-242
  • SAM CLI version:
  • JVM/Python version: SDK - corretto 18

Question
My AWS toolkit crashes all the time I want to run my app in intellij even I login in aws via terminal or from the toolkit bar with this stackTrace:
Exception occurred attempting to inject region/credentials

java.lang.RuntimeException: Configure AWS Connection
	at software.aws.toolkits.jetbrains.core.execution.AwsConnectionRunConfigurationExtension.getConnection(AwsConnectionExtension.kt:100)
	at software.aws.toolkits.jetbrains.core.execution.AwsConnectionRunConfigurationExtension.injectCredentials(AwsConnectionExtension.kt:61)
	at software.aws.toolkits.jetbrains.core.execution.AwsConnectionRunConfigurationExtension.addEnvironmentVariables(AwsConnectionExtension.kt:43)
	at software.aws.toolkits.jetbrains.core.execution.JavaAwsConnectionExtension.updateJavaParameters(JavaAwsConnectionExtension.kt:36)
	at com.intellij.execution.RunConfigurationExtension.updateJavaParameters(RunConfigurationExtension.java:27)
	at com.intellij.execution.JavaRunConfigurationExtensionManager.updateJavaParameters(JavaRunConfigurationExtensionManager.kt:43)
	at com.intellij.execution.application.BaseJavaApplicationCommandLineState.lambda$setupJavaParameters$0(BaseJavaApplicationCommandLineState.java:36)
	at com.intellij.openapi.application.ReadAction.lambda$run$1(ReadAction.java:54)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:264)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:221)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:857)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:66)
	at com.intellij.openapi.application.ReadAction.run(ReadAction.java:53)
	at com.intellij.execution.application.BaseJavaApplicationCommandLineState.setupJavaParameters(BaseJavaApplicationCommandLineState.java:35)
	at com.intellij.execution.application.ApplicationCommandLineState.createJavaParameters(ApplicationCommandLineState.java:75)
	at com.intellij.spring.boot.run.SpringBootCommandLineState.createJavaParameters(SpringBootCommandLineState.java:46)
	at com.intellij.execution.configurations.JavaCommandLineState.getJavaParameters(JavaCommandLineState.java:41)
	at com.intellij.execution.impl.DefaultJavaProgramRunner.patchJavaCommandLineParams(DefaultJavaProgramRunner.java:140)
	at com.intellij.execution.impl.DefaultJavaProgramRunner.lambda$doExecuteAsync$5(DefaultJavaProgramRunner.java:166)
	at com.intellij.execution.target.TargetEnvironmentAwareRunProfileState$1.run(TargetEnvironmentAwareRunProfileState.java:58)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:477)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:528)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:49)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:501)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:466)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:464)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Can you help me to figure out what is going on?

@minaTafreshi99 minaTafreshi99 added the guidance General information and guidance, answers to FAQs, or recommended best practices/resources. label Nov 21, 2024
@johnharby
Copy link

I also get this frequently. I just got it when I had the IDE open and refreshed my AWS credentials from the command line because they had expired. I am using Corretto 17 but the same versions of everything else as [minaTafreshi99]

java.lang.RuntimeException: Configure AWS Connection
at software.aws.toolkits.jetbrains.core.execution.AwsConnectionRunConfigurationExtension.getConnection(AwsConnectionExtension.kt:100)
at software.aws.toolkits.jetbrains.core.execution.AwsConnectionRunConfigurationExtension.validateConfiguration(AwsConnectionExtension.kt:74)
at software.aws.toolkits.jetbrains.core.execution.JavaAwsConnectionExtension.validateConfiguration(JavaAwsConnectionExtension.kt:56)
at com.intellij.execution.configuration.RunConfigurationExtensionsManager.validateConfiguration(RunConfigurationExtensionsManager.kt:159)
at com.intellij.execution.JavaRunConfigurationExtensionManager$Companion.checkConfigurationIsValid(JavaRunConfigurationExtensionManager.kt:31)
at com.intellij.execution.JavaRunConfigurationExtensionManager.checkConfigurationIsValid(JavaRunConfigurationExtensionManager.kt)
at com.intellij.execution.application.ApplicationConfiguration.checkConfiguration(ApplicationConfiguration.java:187)
at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl.checkSettings$lambda$10(RunnerAndConfigurationSettingsImpl.kt:360)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:857)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:889)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:618)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:565)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.executeSynchronously(NonBlockingReadActionImpl.java:506)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl.executeSynchronously(NonBlockingReadActionImpl.java:222)
at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl.checkSettings(RunnerAndConfigurationSettingsImpl.kt:367)
at com.intellij.execution.RunnerAndConfigurationSettings.checkSettings(RunnerAndConfigurationSettings.java:188)
at com.intellij.execution.impl.RunConfigurationIconAndInvalidCache.recalculateIcon$lambda$1(RunConfigurationIconAndInvalidCache.kt:61)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:857)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:889)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:618)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$4(NonBlockingReadActionImpl.java:581)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:351)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:971)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:95)
at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:66)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:157)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:140)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:223)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:45)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:222)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:674)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:749)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:705)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:673)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:203)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:137)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:95)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:581)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:480)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$2(NonBlockingReadActionImpl.java:495)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at java.base/java.lang.Thread.run(Thread.java:1583)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance General information and guidance, answers to FAQs, or recommended best practices/resources.
Projects
None yet
Development

No branches or pull requests

2 participants