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

java.util.NoSuchElementException: Array contains no element matching the predicate. #2504

Closed
itsandreramon opened this issue Mar 17, 2021 · 4 comments
Labels
bug We can reproduce the issue and confirmed it is a bug.

Comments

@itsandreramon
Copy link

Description

After starting CLion, the following error message is shown:

java.util.NoSuchElementException: Array contains no element matching the predicate.
	at software.aws.toolkits.jetbrains.services.lambda.execution.local.LocalLambdaRunConfigurationProducer$Companion.getFactory(LocalLambdaRunConfigurationProducer.kt:128)
	at software.aws.toolkits.jetbrains.services.lambda.execution.local.LocalLambdaRunConfigurationProducer.getConfigurationFactory(LocalLambdaRunConfigurationProducer.kt:95)
	at com.intellij.execution.actions.RunConfigurationProducer.cloneTemplateConfiguration(RunConfigurationProducer.java:248)
	at com.intellij.execution.actions.RunConfigurationProducer.createConfigurationFromContext(RunConfigurationProducer.java:97)
	at com.intellij.execution.actions.RunConfigurationProducer.findOrCreateConfigurationFromContext(RunConfigurationProducer.java:198)
	at com.intellij.execution.actions.PreferredProducerFind.doGetConfigurationsFromContext(PreferredProducerFind.java:110)
	at com.intellij.execution.actions.PreferredProducerFind.getConfigurationsFromContext(PreferredProducerFind.java:93)
	at com.intellij.execution.actions.ConfigurationContext.getConfigurationsFromContext(ConfigurationContext.java:372)
	at com.intellij.execution.lineMarker.ExecutorAction$Companion.computeConfigurations(ExecutorAction.kt:61)
	at com.intellij.execution.lineMarker.ExecutorAction$Companion.getConfigurations(ExecutorAction.kt:53)
	at com.intellij.execution.lineMarker.ExecutorAction$Companion.access$getConfigurations(ExecutorAction.kt:24)
	at com.intellij.execution.lineMarker.ExecutorAction.getActionName(ExecutorAction.kt:95)
	at com.intellij.execution.lineMarker.ExecutorAction.update(ExecutorAction.kt:70)
	at com.intellij.execution.lineMarker.RunLineMarkerContributor.getText(RunLineMarkerContributor.java:83)
	at org.rust.ide.lineMarkers.CargoExecutableRunLineMarkerContributor.access$getText$s-1171017470(CargoExecutableRunLineMarkerContributor.kt:18)
	at org.rust.ide.lineMarkers.CargoExecutableRunLineMarkerContributor$getInfo$1.fun(CargoExecutableRunLineMarkerContributor.kt:28)
	at org.rust.ide.lineMarkers.CargoExecutableRunLineMarkerContributor$getInfo$1.fun(CargoExecutableRunLineMarkerContributor.kt:18)
	at com.intellij.execution.lineMarker.RunLineMarkerContributor$Info.lambda$new$0(RunLineMarkerContributor.java:47)
	at com.intellij.execution.lineMarker.RunLineMarkerProvider.lambda$getLineMarkerInfo$1(RunLineMarkerProvider.java:92)
	at com.intellij.codeInsight.daemon.LineMarkerInfo.getLineMarkerTooltip(LineMarkerInfo.java:205)
	at com.intellij.codeInsight.daemon.LineMarkerInfo$LineMarkerGutterIconRenderer.getTooltipText(LineMarkerInfo.java:270)
	at com.intellij.openapi.editor.impl.EditorGutterComponentImpl$2.lambda$run$0(EditorGutterComponentImpl.java:1737)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:889)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
	at com.intellij.openapi.editor.impl.EditorGutterComponentImpl$2.run(EditorGutterComponentImpl.java:1737)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:962)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:472)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	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)

Related problems

This could also cause CLion to fail determine run-configurations for the cargo project. It works correctly when the AWS Toolkit plugin is disabled.

Screenshot 2021-03-17 at 14 37 10

Reproduce

  1. Install CLion 2020.3.3
  2. Install AWS CLI v2, SAM, Docker, etc. as described here
  3. Install official Rust and Toml plugins
  4. Create a new project using cargo new <project-name>
  5. See the error appear in the lower right corner of CLion status bar

Expected behaviour

No error is thrown.

Screenshots
Screenshot 2021-03-17 at 14 38 23

Environment

  • OS: macOS 11.2.3 Big Sur
  • JetBrains product: CLion
  • JetBrains product version: 2020.3.3
  • AWS Toolkit version: 1.2.5-203
  • SAM CLI version: 1.21.1
  • JVM/Python version: Integrated JBR 11 runtime
@itsandreramon itsandreramon added the bug We can reproduce the issue and confirmed it is a bug. label Mar 17, 2021
@abrooksv
Copy link
Contributor

Thanks for the bug report, makes sense since we have no supported Lambda runtimes in CLion.

@abrooksv
Copy link
Contributor

abrooksv commented Mar 17, 2021

Current workaround would be to enable the JavaScript plugin or the Python plugin until we get our next release out.

@DanielSOhara27
Copy link

I am getting the same error message, but I am not using CLion. I simply installed the aws-toolkit plugin in different jetbrains products (IntelliJ and DataGrip). Is the core of this issue something different?

I ask because I installed the plugin, configured my AWS Profile, successfully connected and the next day I started getting the same error message as the OP.

@abrooksv
Copy link
Contributor

abrooksv commented Apr 9, 2021

I am getting the same error message, but I am not using CLion. I simply installed the aws-toolkit plugin in different jetbrains products (IntelliJ and DataGrip). Is the core of this issue something different?

I ask because I installed the plugin, configured my AWS Profile, successfully connected and the next day I started getting the same error message as the OP.

It affects any IDE that lacks an installed language plugin that we support.

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

3 participants