You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: cannot use REST client vscode extension #5399
I have the same issue (also with some other extensions) when code-server is exposed externally (http, https, w/ or w/o password). However, it works when using 127.0.0.1 (with SSH tunnel for example).
If I access to the docker host directly, let's say http://172.20.5.109:8080/, the extension is broken.
That means you're not using HTTPS so service workers won't work so the extension shouldn't work. I think that proves that this is related to HTTPS then. And I don't think there's any way to work around this unfortunately.
Activity
jsjoeio commentedon Aug 3, 2022
Are there any logs in the browser you can share?
adeleporte commentedon Aug 25, 2022
I have the same issue (also with some other extensions) when code-server is exposed externally (http, https, w/ or w/o password). However, it works when using 127.0.0.1 (with SSH tunnel for example).
Seems to be related to sha-256 calculations...
I have this error message in the browser logs : ERR Can't compute sha-256: t@http://10.*.*.*:8081/static/out/vs/workbench/workbench.web.main.js:798:15149
jsjoeio commentedon Aug 25, 2022
Interesting 🤔
Running locally on localhost:8080, I can't reproduce.
I tested it by exposing via
ngrokand it works as expected as well:If you could paste a screenshot or the entire browser logs, that would help.
adeleporte commentedon Aug 25, 2022
Sure:

Browser logs:
jsjoeio commentedon Aug 29, 2022
Very helpful! Looks like your error is originating here:
https://github.com/microsoft/vscode/blob/main/src/vs/workbench/browser/webview.ts#L11
Can you try using something like
ngrokand seeing if you still get the error?If you do get the error, not related to HTTPS
If you don't, probably related toHTTPS
adeleporte commentedon Aug 29, 2022
Thanks for the update. Unfortunately, I can't use ngrok (company policy).
But there is a very simple way to reproduce it, by using the docker image:
docker run -d -p 0.0.0.0:8080:8080 --rm codercom/code-server
If I access to http://127.0.0.1:8080, or http://localhost:8080, everything is working fine.
If I access to the docker host directly, let's say http://172.20.5.109:8080, the extension is broken.
This docker image doesn't use https, so I would say that the issue is not related to https.
Thanks for looking at this issue!
jsjoeio commentedon Aug 29, 2022
That means you're not using HTTPS so service workers won't work so the extension shouldn't work. I think that proves that this is related to HTTPS then. And I don't think there's any way to work around this unfortunately.
adeleporte commentedon Aug 29, 2022
Hum interesting..
I have created a new "https" docker image with this Docker file:
FROM codercom/code-server:latest
COPY config.yaml /home/coder/.config/code-server/config.yaml
ENTRYPOINT ["/usr/bin/entrypoint.sh", "."]
and this config file :
bind-addr: 0.0.0.0:443
auth: password
password: test
cert: true
docker run -d -p 0.0.0.0:443:443 --rm adeleporte/httpscoder
And this time, it does work with any address/fqdn...
I will re-check with my previous configuration.
Thanks!
jsjoeio commentedon Aug 29, 2022
Well that is certainly good news to my Monday! Sounds good!
code-asher commentedon Mar 12, 2024
Closing since it seems this is solved?