excalidraw / excalidraw-vscode

Excalidraw for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=pomdtr.excalidraw-editor
MIT License
477 stars 60 forks source link

Error in Github Codespaces #77

Closed public-rant closed 1 year ago

public-rant commented 1 year ago

This extension is great however it didn't work of the box for me on GitHub Codespaces.

This was the error:

Error loading webview: Error: Could not register service workers: NotSupportedError:
Failed to register a ServiceWorker for scope ('https://1jc8pfnmq8dc5j5m7ng194t226ap3tij2vpd5kl2a4r9r05ie3ge
.vscode-cdn.net/stable/e8a3071ea4344d9d48ef8a4df2c097372b0c5161/out/vs/workbench
/contrib/webview/browser/pre/') with script ('https://1jc8pfnmq8dc5j5m7ng194t226ap3tij2vpd5kl2a4r9r05ie3ge
.vscode-cdn.net/stable/e8a3071ea4344d9d48ef8a4df2c097372b0c5161
/out/vs/workbench/contrib/webview/browser/pre/service-worker.js?v=4&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&remoteAuthority=codespaces+public-rant-animated-spork-5975j7rxrr9h55'):
The user denied permission to use Service Worker..

I know Codespaces is something of an edge case but I'd be curious if there is any interest in using excalidraw with Codespaces!

I sure am.


Note, I edited the error message for readability.

pomdtr commented 1 year ago

Codespaces support is a valid usecase, not sure why this is not working. vscode.dev / github.dev works just fine đŸ˜…

pomdtr commented 1 year ago

Do you use the brave browser or an adblocker ? The error looks like a browser permission missing ("The user denied permission to use Service Worker").

public-rant commented 1 year ago

Hey, indeed - It could be brave browser. I always forget that. I'll check it out and report back.


Yep, that must have been it. Seems to be working in Safari.

For anyone who finds their way here, ☕

pomdtr commented 1 year ago

You can disable the brave shield on GitHub codespaces to fix the issue :)

public-rant commented 1 year ago

I'd tip you some BAT but you don't have a creator account yet haha

pomdtr commented 1 year ago

Your gratitude is sufficient!

I might create a GitHub sponsor account in the future.