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
Code-server can not install as desktop PWA in current version #1181
Code-server can be installed as desktop PWA in past version. But in current version, code-server can not be installed, the install icon in chrome address bar is missing. I found that there is no service worker in dev-tools/application.
Unfortunately, this is a upstream issue, which we cannot solve by our own. If you think this also has the same behavior with VS Online, open an issue in Microsoft/vscode as well.
Can you reference where this is upstream? As far as I can tell it is an issue of a malformed manifest.
{
"name": "code-server",
"short_name": "code-server",
"start_url": ".",
"display": "standalone",
"background-color": "#fff",
"description": "Run VS Code on a remote server.",
"icons": [{
"src": "./code-server.png",
"sizes": "384x384",
"type": "image/png"
}]
}
My command to start it is: code-server --host=0.0.0.0 --auth=none --port=8080 --base-path=/code I am behind a reverse proxy then that will forward https://gateway.foo.com/code to the local docker on port 8080.
Is the upstream bug in loader.js? As far as I can tell that is what registers the service workers. It loads from / first and then later it will use the correct base path.
Interesting, since the start URL is "." and you visit /code, that
resolves to /code-server.png. If you visited /code/ (trailing slash), it
would resolve to /code/code-server.png.
I think what we'll need to do is inject the base path into the manifest
before serving it.
Activity
sr229 commentedon Nov 17, 2019
Unfortunately, this is a upstream issue, which we cannot solve by our own. If you think this also has the same behavior with VS Online, open an issue in Microsoft/vscode as well.
geiseri commentedon Feb 13, 2020
Can you reference where this is upstream? As far as I can tell it is an issue of a malformed manifest.
My command to start it is:
code-server --host=0.0.0.0 --auth=none --port=8080 --base-path=/codeI am behind a reverse proxy then that will forward https://gateway.foo.com/code to the local docker on port 8080.When I open the link the first thing is see is that the icon for
code-server.pngis not valid because it is looking for https://gateway.foo.com/code-server.png instead of https://gateway.foo.com/code/code-server.png. In general, it looks like some of the earlier calls go to https://gateway.foo.com and not https://gateway.foo.com/code, but somehow the server still replies so it works, but it might confuse the workers.Is the upstream bug in
loader.js? As far as I can tell that is what registers the service workers. It loads from/first and then later it will use the correct base path.code-asher commentedon Feb 18, 2020
Inject base path into manifest
Inject base path into manifest
Register a service worker