code-server icon indicating copy to clipboard operation
code-server copied to clipboard

Error loading webview: Service Workers are not enabled in browser. Webviews will not work.

Open codeoflin opened this issue 6 years ago • 10 comments

image when I want to install a extension i just got this: Error loading webview: Service Workers are not enabled in browser. Webviews will not work.

codeoflin avatar Sep 01 '20 02:09 codeoflin

@codeoflin https://developer.mozilla.org/zh-CN/docs/Web/API/Service_Worker_API/Using_Service_Workers must https

pavlelee avatar Sep 01 '20 03:09 pavlelee

@codeoflin https://developer.mozilla.org/zh-CN/docs/Web/API/Service_Worker_API/Using_Service_Workers must https

Thanks

codeoflin avatar Sep 01 '20 04:09 codeoflin

Wait, I have the same issue and wasn't able to find how you can fix it in the linked document. @pavlelee @codeoflin Can you explain a bit more about how you resolved this issue?

Edit: since you commented "must https" I searched for how to run code-server over https and found #1548, but there seems to be no available solution yet (at least in Chrome).

Edit 2: Nevermind, #1048 also discusses using code-server over https. Guess I'll just try to get https working.

cheulyop avatar Sep 03 '20 07:09 cheulyop

https://github.com/cdr/code-server/blob/v3.5.0/doc/guide.md#lets-encrypt may be of use. Caddy is a pretty painless way to get HTTPS going assuming you have a domain name.

code-asher avatar Sep 03 '20 15:09 code-asher

Hello , may i ask for clarification I am running code-server from my VPS (Ubuntu/1gb) and i get this message. I run it like this http://mysite.com:9999 if i switch to https://mysite.com:9999 will extensions work and for example have .net core extensions running so i can debug and run .net core applications

Edit : I can confirm that caddy works fine take note that you should clear completely the Caddyfile and place exactly what is documented. If you want to redirect the https to another port YourDomain:8081 reverse_proxy 127.0.0.1:8080 er port

tsgiannis avatar Nov 25 '20 19:11 tsgiannis

I am also facing these issues I tried my best but issues still here

Haseb-ali avatar May 25 '21 17:05 Haseb-ali

@Haseb-ali Please feel free to open a new issue and we can try to debug.

Also if possible you could try --link which will proxy through our cloud and handle TLS for you.

code-asher avatar May 27 '21 18:05 code-asher

Please switch off ad block in your browser, if you are coding by GitHub Codespaces

demetrius2017 avatar Dec 07 '21 08:12 demetrius2017

I was attempting to use GitHub Codespaces to edit some Jupyter notebooks, because I don't have a local environment setup on my computer. Using Firefox, I was encountering this error, even after disabling all my adblockers and anti-tracking extensions. What ultimately solved the issue for me is disabling this new feature in Firefox meant to stop inter-site tracking. Other browsers may have similar features, so if anyone else is having issues with webview, try disabling features like Total Cookie Protection. The screenshot below is off the checkbox I unticked to make Codespaces work. image

GrantRVD avatar May 28 '22 11:05 GrantRVD

Please switch off ad block in your browser, if you are coding by GitHub Codespaces

Thank you, it has solved my issue.

MdShafiurRahman0 avatar Dec 31 '22 06:12 MdShafiurRahman0