Skip to content

FileSystemProvider gets reinitialized in a completely new JavaScript context #103181

@TomasHubelbauer

Description

@TomasHubelbauer
  • VSCode Version: 1.47.2 user setup
  • OS Version: Windows 10

Steps to Reproduce:

  1. Clone my extension https://github.com/TomasHubelbauer/vscode-email-viewer and the repository in VS Code
  2. Go to debug by pressing F5
  3. Watch the extension host window pointed to the demo directory appear and select real.eml
  4. Watch a progress indicator appear and go while the email file loads - this populates the cache from cache.ts in extension.js
  5. Watch a new workspace directory appear and list the correct entries (3 PNGs and 1 HTML file) as the cache now has an entry for the parsed contents of the real.eml file selected previously
  6. Wait a bit
  7. Watch a spinner appear next to the already loaded and populated workspace directory node for the real.eml file virtual directory as stat on the FS provider is called again even though it was already called while populating the node initially
  8. Watch an error message pop up because the cache.ts module was reloaded for some reason and this stat call sees {} not the populated cache object which was initialized before when the progress indicator appeared after clicking real.eml
  9. See the debug console in VS Code proper (not the extension host window) and notice the Cache init line appear twice when it should have appeared once because it is in the cache.ts module global context which to me is indicative of a JavaScript context change/reload? (But the window did not reload...)
  10. Be confused

Does this issue occur when all extensions are disabled?: N/A

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions