Repository navigation
Show an error when the dialog to open a course fails - #80
Merged
Merged
Conversation
When a course is opened from the browser in a new project, ProjectOpener creates JoinCourseDialog inside invokeAndWait. If building the dialog threw, the exception escaped ProjectOpener.open, and the platform RestService only logged it. The caller's error branch never ran, so the user saw the course loading progress and then nothing. A GoLand 2026.3 tester hit this with a NoClassDefFoundError for GoSdkChooserCombo (EDU-9241, fixed separately in #78). ProjectOpener now catches unexpected failures of newProject, logs them as errors and returns a ValidationErrorMessage. The existing callers show it as a notification. Control-flow and cancellation exceptions are still rethrown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A tester on GoLand 2026.3.0.1 with plugin 2026.22 reported that opening a Hyperskill Go project from the browser showed the course loading progress, and then nothing happened. No project settings dialog and no error appeared.
Cause
The root cause in their log is a
NoClassDefFoundErrorforcom/goide/sdk/combobox/GoSdkChooserCombo, thrown whileJoinCourseDialogwas being built. That is EDU-9241, fixed separately in #78.The reason it was silent is in
ProjectOpener.openInNewProject. The dialog is created insideinvokeAndWait. When building it throws, the exception escapesProjectOpener.open, and the platformRestServiceonly logs it as SEVERE.HyperskillRestService.openInIDEnever reaches itsErrbranch, which is what shows a notification to the user. So any crash in this path leaves the user with nothing.Fix
ProjectOpener: callsnewProject(course)throughshowNewProjectDialog. An unexpected exception is logged withLOG.error, so the IDE error indicator with "Plugin to blame" still appears. It is then returned asErr(ValidationErrorMessage(...)).ControlFlowExceptionandCancellationExceptionare still rethrown.Err. The REST service shows a notification, for example: Failed to open the "Coffee Machine (Go)" course. See the IDE log for details. The browser gets the same 404 as for other opening errors.HyperskillProjectActionshows the error through its callback, and the next-activity flow logs it.EduCoreBundle: new keyerror.failed.to.open.course, in English only, like most keys.Successful openings and the existing validation errors behave as before.
Testing
HyperskillProjectOpenStageTest,MockProjectOpener.newProjectFailuremakesnewProjectthrow aNoClassDefFoundError. The test checks that the error is logged and thatopenreturns the expectedValidationErrorMessage../gradlew :intellij-plugin:test --tests "org.hyperskill.academy.learning.stepik.hyperskill.projectOpen.*" --tests "org.hyperskill.academy.learning.stepik.hyperskill.HyperskillNextActivityTest"on 263: 22 tests, all passed.LoggedErrorProcessor.executeAndReturnLoggedError(Runnable); javap confirms it exists in the 252 and 263 test frameworks.