Skip to content

Code-server can not install as desktop PWA in current version #1181

Closed

Description

@tgly307
  • code-server version: 2.1692-vsc1.39.2
  • OS Version: centOS 7, docker version 18.09.0

Description

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.

Steps to Reproduce

  1. install code-server by docker image
  2. open code-server in chrome and check

Activity

  1. sr229 commented on Nov 17, 2019

    @sr229
    Contributor

    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.

  2. geiseri commented on Feb 13, 2020

    @geiseri
    Contributor

    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.

    When I open the link the first thing is see is that the icon for code-server.png is 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.

  3. code-asher commented on Feb 18, 2020

    @code-asher
    Member
  4. reopened this on Feb 18, 2020
  5. added 2 commits that reference this issue on Feb 18, 2020
    597f7c0
    d47591e
  6. added a commit that references this issue on Feb 27, 2020
    963ebac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions