Repository: vscode
Issue: [CustomTextEditor Web extensions] "Unable to resolve filesystem provider with relative file path" after reloading vscode.dev and reopening named untitled document in custom text editor
Labels: bug,custom-editors

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.67.2
- OS Version: Chrome

[CustomTextEditor Web extensions] "Unable to resolve filesystem provider with relative file path" after reloading vscode.dev and reopening named untitled document in custom text editor

This bug is very similar to https://github.com/microsoft/vscode/issues/150359 and probably has the same cause.

Steps to Reproduce:

1. Go to https://vscode.dev and install CustomTextEditor extension like [Pipeline Editor](https://marketplace.visualstudio.com/items?itemName=Cloud-pipelines.pipeline-editor-vscode)
2. Open File menu, click "New File...", choose Pipeline. Wait couple of seconds for the interface to load the first time.
3. Press F5 to reload the page
4. Observe that the "pipeline.component.yaml" tab has reloaded and and has content (however now it's opened in the default text editor, and not the custom editor, which is another bug I'll file separately)
5. Right-click on tab and choose "Reopen Editor with..." and select "Cloud Pipeline Editor"
6. ! The tab shows "... unable to resolve filesystem provider with relative path: 'tmp:pipeline.component.yaml'"
7. Reload the page again
8. Observe that the the "pipeline.component.yaml" tab is now gone along with the data

```
ERR Unable to resolve filesystem provider with relative file path 'tmp:pipeline.component.yaml': Error: Unable to resolve filesystem provider with relative file path 'tmp:pipeline.component.yaml'
    at f.withProvider (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:594:15543)
    at f.withReadProvider (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:594:15842)
    at f.readFileStream (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:594:20893)
    at l.doRead (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:2756:42367)
    at l.readStream (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:2756:42030)
    at tr.resolveFromFile (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:2745:66781)
    at tr.doResolve (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:2745:65067)
    at async u.doResolve (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:2756:36879)
    at async l.acquire (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:17:32618)
    at async createModelReference (https://main.vscode-cdn.net/stable/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/out/vs/workbench/workbench.web.main.js:2745:79579)
workbench.web.main.js:sourcemap:594   ERR Error: Unable to resolve filesystem provider with relative file path 'tmp:pipeline.component.yaml'
    at f.withProvider (workbench.web.main.js:sourcemap:594:15543)
    at f.withReadProvider (workbench.web.main.js:sourcemap:594:15842)
    at f.readFileStream (workbench.web.main.js:sourcemap:594:20893)
    at l.doRead (workbench.web.main.js:sourcemap:2756:42367)
    at l.readStream (workbench.web.main.js:sourcemap:2756:42030)
    at tr.resolveFromFile (workbench.web.main.js:sourcemap:2745:66781)
    at tr.doResolve (workbench.web.main.js:sourcemap:2745:65067)
    at async u.doResolve (workbench.web.main.js:sourcemap:2756:36879)
    at async l.acquire (workbench.web.main.js:sourcemap:17:32618)
    at async createModelReference (workbench.web.main.js:sourcemap:2745:79579)
```

![image](https://user-images.githubusercontent.com/1829149/170241267-59abaf5c-f18a-4b0e-8793-f50181d0fc7d.png)


https://user-images.githubusercontent.com/1829149/170240673-23e2b149-ae1d-423a-8761-ab3ccf2de6ad.mp4