coder / coder/jetbrains-coder

Improve Error Logging During Connection Establishment

Open
#514 0 comments 1 reaction 0 assignees View on GitHub
upstream
Dominant language
Kotlin
Stars
33
Forks
18
Avg merge
2d 13h
Merged PRs (30d)
1

Description

### Problem Description

When establishing a connection via the Coder Registry module that uses the URI handler or Coder JetBrains Gateway Plugin wizard, users are presented with insufficient error logs when the connection fails. This makes it difficult to troubleshoot and identify the root cause. A few example errors are given below.

![Image](https://github.com/user-attachments/assets/61ede519-1deb-491d-86ac-96994c05b5b7)

![Image](https://github.com/user-attachments/assets/577bd520-f818-4d22-92d6-77fdbac38fa6)

### Current Issues:
The logs can be collected from the Collect Logs button and suggest repeated retries but do not guide users on the next steps.

```console
java.lang.Throwable: Failed to retrieve IDEs (attempt 4; will retry in 49718 ms)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at com.coder.gateway.views.steps.CoderWorkspaceProjectIDEStepView$init$1$ides$2.invoke(CoderWorkspaceProjectIDEStepView.kt:242)
at com.coder.gateway.views.steps.CoderWorkspaceProjectIDEStepView$init$1$ides$2.invoke(CoderWorkspaceProjectIDEStepView.kt:206)
at com.coder.gateway.util.RetryKt.suspendingRetryWithExponentialBackOff(Retry.kt:62)
at com.coder.gateway.util.RetryKt$suspendingRetryWithExponentialBackOff$1.invokeSuspend(Retry.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:125)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
```

- Lack of detailed error messages to guide users.
- Logs are not surfaced or accessible during the connection process.

### Desired Solution

Implement streaming logs that provide visibility into the connection process and allow copying logs. Similar to how the VSCode remote does.

Improving the error messaging and log visibility will:
- Reduce user frustration by making failures more transparent.
- Speed up troubleshooting for both users and support teams.
- Enhance reliability and trust in the platform’s connection processes.

Upstream Issue: https://youtrack.jetbrains.com/issue/GTW-10251/Unactionable-Error-messages

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.