vscode: Can't close file in editor

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.63.2
  • OS Version: Linux x64 5.8.0-7642-generic

Problem:

I was editing a Jupyter notebook in VS Code and I moved the file to another folder. After I closed and reopened the VSCode window, the editor for that file became stuck in a state where the editor tab fails to load (The editor could not be opened due to an unexpected error. Try again) and also fails to close. When I try to close it, an error pop up appears with the message “Unable to open 'my_notebook.ipynb': No file system provider found for resource vscode-notebook:/path/to/my_notebook.ipynb'.”.

I am stuck with this tab open for 2 months now.

Is there a way to force it to close?

Steps to Reproduce:

I can’t reproduce this behaviour with other files.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

I have the same issue. It reopens if I select Don't save when closing the file. It also reopens if I click Save and then do a git restore <file_name> to revert the changes in the terminal inside of VS Code / with the source control part of the VS Code GUI.

For now it works (file stays closed) if I close VS Code, do a git restore <file_name> in a standalone terminal program (emulator) and then reopen VS Code.

VS Code’s about page:

Version: 1.64.2
Commit: f80445acd5a3dadef24aa209168452a3d97cc326
Date: 2022-02-09T22:02:29.527Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.13.0-30-generic snap

(Ubuntu 20.04 LTS)

By the way, I managed to close the notebook editor by accident a week after posting here. With the editor split in two columns, I dragged it from one column to the other and it disappeared. I updated vscode a few days prior to this event, and the bug was still there.