theia icon indicating copy to clipboard operation
theia copied to clipboard

Dirty editors cannot be saved after application recovers from "offline" mode

Open kenneth-marut-work opened this issue 2 years ago • 4 comments

Bug Description:

If a backend process hogs resources and blocks frontend<->backend communication the application will go "offline" and eventually recover. During this time, the frontend can be slow to recognize that connection is interrupted as per #12194 and a user may continue to make edits to a file, putting it into a dirty state. When the application finally recovers from "offline" mode, it is impossible to save any new changes to the existing editor. The editor must be closed and reopened.

Steps to Reproduce:

  1. Build this branch which adds a command to hang the backend for 3 minutes.
  2. Start Theia for browser and open an editor (FileA.txt)
  3. Run the command "hang backend"
  4. Start making edits to FileA.txt and try to save them (they will fail because the backend is blocked, notice also that there is no indication that there is a failure)
  5. Eventually (about 1 min) the status bar will turn yellow (#12194), after 3 minutes the "hang backend" command will complete and the status bar will return to blue. The application should be interactive again
  6. notice that you still cannot save your edits you made to FileA.txt

Additional Information

  • Operating System:
  • Linux
  • Theia Version: Master

kenneth-marut-work avatar Feb 17 '23 18:02 kenneth-marut-work