Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web: contributed fs provider delayed and missing right after startup #11

Closed
aeschli opened this issue Sep 30, 2021 · 3 comments
Closed
Assignees

Comments

@aeschli
Copy link
Contributor

aeschli commented Sep 30, 2021

  • clone https://github.com/aeschli/ext-web-issue-133947
  • npm i && npm run run-in-browser
  • the test extension (/ext-web-issue-133947) is activated on *
    • it opens an editor on vscode-test-web://mount/extension.ts
      🐛 -> no editor opens
  • run the 'Hello World' command
    • now the editor opens
  • change the code and add a timeout 1000 around the openEditor code. Now it works.

Looks like the registration of the fs provider is delayed.

image

@gjsjohnmurray
Copy link

microsoft/vscode#122004 may be relayted.

@bpasero
Copy link
Member

bpasero commented Oct 1, 2021

At first I had thought maybe the extension activation is to blame here: it is probably dangerous that both extensions activate at the same time and the one depends on the other. What happens if your extension is activated first and then the one providing the file system?

Anyhow, from the console messages it seems the order is correct so you maybe lucky in this case.

The error in the console also confirms that: it is not an error indicating that we are missing a file system provider, but we literally seem to fail to find the file: Error: Unable to resolve nonexistent file 'vscode-test-web://mount/extension.ts'

When I debug this further, I see that we actually correctly use the RemoteFileSystemProvider here:

https://github.com/microsoft/vscode/blob/12167d7ce87e2a6721464a29c28c390618c4f8f7/src/vs/workbench/api/browser/mainThreadFileSystem.ts#L199

Printing the error from that call I see:

EntryNotFound (FileSystemError): vscode-test-web://mount/extension.ts
	at MountsFileSystemProvider._lookup (http://localhost:3000/static/fsproviderextension/dist/fsExtensionMain.js#vscode-extension:221:52)
	at async MountsFileSystemProvider.stat (http://localhost:3000/static/fsproviderextension/dist/fsExtensionMain.js#vscode-extension:101:23)

Which makes me believe it is a problem with your extension. From the workbench point of view, everything seems to be working OK.

@bpasero bpasero removed their assignment Oct 1, 2021
@aeschli aeschli transferred this issue from microsoft/vscode Oct 1, 2021
@aeschli
Copy link
Contributor Author

aeschli commented Oct 1, 2021

Thanks @bpasero, you are absolutely right. Sorry I didn't figure that out myself.

@aeschli aeschli closed this as completed in a22cd07 Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants