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

IDE2 frontend cannot save the sketch content when the IDE2 backend process crashed #2081

Closed
3 tasks done
kittaakos opened this issue May 30, 2023 · 0 comments · Fixed by #2082
Closed
3 tasks done
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

kittaakos commented May 30, 2023

Describe the problem

This issue was initially reported at #2079 (comment):

There is another regression. When the IDE2 backend process crashes, IDE2 is used to warn users to copy the sketch content and save it with their favorite text editor. It does not work anymore. It's been broken since Theia started to use socket.io, and the connectionStatusService is no longer hitting the expected error as the connection tries to reconnect forever. Ref: cff2c95

To reproduce

  • open IDE2 from a terminal, create a new sketch, turn auto-save off,
  • check the IDE2 logs while the app runs and search for Starting backend process. PID: $PID_NUMBER in the logs.
  • kill the backend process (on UNIX, this is kill -9 $PID_NUMBER),
  • modify the sketch and save it. You see the Could not save the sketch. Please copy your unsaved work into your favorite text editor, and restart the IDE. error notification.

Expected behavior

When the sketch content cannot be saved, IDE2 must warn users to save their work manually.

Arduino IDE version

2.1.0

Operating system

macOS

Operating system version

12.6.3

Additional context

The issue was reported in the internal issue tracker under ATL-667.
Here is a public ref: arduino/arduino-pro-ide#379
Upstream: socketio/socket.io-client#1023

I propose lowering the severity of this issue. The backend process of IDE2 used to crash when the CLI was in a very early stage, and when a panic occurred in the CLI, the entire backend process spawned the CLI daemon had crashed. An example is arduino/arduino-cli#414; this is not happening anymore, as far as I know.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels May 30, 2023
@kittaakos kittaakos self-assigned this May 30, 2023
kittaakos pushed a commit that referenced this issue May 30, 2023
Happens when the IDE2 backend process crashes, and the communication
drops between the client and the server.

Closes #2081

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jun 9, 2023
Happens when the IDE2 backend process crashes, and the communication
drops between the client and the server.

Closes #2081

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jun 9, 2023
Happens when the IDE2 backend process crashes, and the communication
drops between the client and the server.

Closes #2081

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants