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

[codecatalyst] Gateway failed to connect to dev-environment, scripts missing #4188

Open
zhiyanliu opened this issue Mar 15, 2024 · 0 comments
Labels
bug We can reproduce the issue and confirmed it is a bug.

Comments

@zhiyanliu
Copy link

Describe the bug
I created a Dev Environment in the CodeCatalyst first. When I try to connect it to my local Gateway/PyCharm by click the link "Open In PyCharm Professional" in the CodeCatalyst web page, I can see the aws tool-kit plugin has been installed successfully first (only once) but finally an error message popped up:

Dev Environment connection failed

/Users/myname/Library/Application Support/JetBrains/JetBrainsGateway2023.3/plugins/plugin-toolkit/gateway-resources/scripts.tar.gz

To reproduce

  1. Create a Dev Environment with my catalyst source repo, wait it to under the RUNNING state.
  2. Click the link of the Dev Environment record/resource "Open In PyCharm Professional".
  3. Chrome/web page asks me "Open Gateway.app?", click "Open Gateway.app".
  4. My local Jetbrains Gateway app will be launched.
  5. A dialog titled "Launching Dev Environment (This may take a few minutes)" popped up, a progress bar (loop style) shows only.
  6. A new dialog shows "Copy script", and closed very quick.
  7. Above error "Dev Environment connection failed" shows. At the moment, I checked the Gateway's error log:
Caught exception while connecting to dev environment

java.nio.file.NoSuchFileException: /Users/myname/Library/Application Support/JetBrains/JetBrainsGateway2023.3/plugins/plugin-toolkit/gateway-resources/scripts.tar.gz
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)
    at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
    at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
    at java.base/java.nio.file.Files.readAllBytes(Files.java:3288)
    at software.aws.toolkits.jetbrains.gateway.connection.workflow.CopyScripts$constructCommandLine$1.invoke(CopyScripts.kt:23)
    at software.aws.toolkits.jetbrains.gateway.connection.workflow.CopyScripts$constructCommandLine$1.invoke(CopyScripts.kt:21)
    at software.aws.toolkits.jetbrains.gateway.connection.AbstractSsmCommandExecutor.buildSshCommand(AbstractSsmCommandExecutor.kt:60)
    at software.aws.toolkits.jetbrains.gateway.connection.workflow.CopyScripts.constructCommandLine(CopyScripts.kt:21)
    at software.aws.toolkits.jetbrains.utils.execution.steps.CliBasedStep.execute(CliBasedStep.kt:42)
    at software.aws.toolkits.jetbrains.utils.execution.steps.Step.run(Step.kt:24)
    at software.aws.toolkits.jetbrains.utils.execution.steps.Step.run$default(Step.kt:14)
    at software.aws.toolkits.jetbrains.gateway.CawsConnectionProvider$runBackendWorkflow$start$workflow$1.execute(CawsConnectionProvider.kt:482)
    at software.aws.toolkits.jetbrains.utils.execution.steps.Step.run(Step.kt:24)
    at software.aws.toolkits.jetbrains.utils.execution.steps.Step.run$default(Step.kt:14)
    at software.aws.toolkits.jetbrains.utils.execution.steps.StepExecutor.execute(StepExecutor.kt:62)
    at software.aws.toolkits.jetbrains.utils.execution.steps.StepExecutor.startWorkflow$lambda$1(StepExecutor.kt:55)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:249)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:840)

Expected behavior
The project can be edited in my local IDE via Gateway.

Screenshots
I'd like to upload if needed in the follow comments.

Your Environment

  • OS: MacOS 14.4 (23E214)
  • JetBrains product: JetBrains Gateway
  • JetBrains product version: 2023.3.4
  • AWS Toolkit version: GW-2.13-233
  • SAM CLI version: 1.111.0
  • JVM/Python version:

Additional context
N/A

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

1 participant