Description
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 theconnectionStatusService
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