Skip to content

Extension icons don't load #627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
t-d-d opened this issue May 1, 2019 · 4 comments
Closed

Extension icons don't load #627

t-d-d opened this issue May 1, 2019 · 4 comments

Comments

@t-d-d
Copy link

t-d-d commented May 1, 2019

  • code-server version: 1.939-vsc1.33.1
  • OS Version: docker ubuntu:18.10
  • Extension: A few. E.g. auchenberg.vscode-browser-preview

Description

Some extension icons for the tool bar fail to load.

Steps to Reproduce

  1. Extension is installed in docker build
  2. Run the container
  3. Open Chrome web browser - extension starts but icon in left palette is missing. Tooltip still works.

Chrome console log reports resource failed to load - Host Not Found. URL it's trying to load is missing the hostname: http://my_sub_path/resource/home/coder/.local/share/code-server/extensions/chrome-preview/resources/icon.svg

Note that I am hosting on a path - my_sub_path.

@foresthoffman
Copy link
Contributor

@t-d-d If you ls that directory (/home/coder/.local/share/code-server/extensions/chrome-preview/resources/) what are the contents?

@t-d-d
Copy link
Author

t-d-d commented May 1, 2019

>ls /home/coder/.local/share/code-server/extensions/chrome-preview/resources/
demo.gif  demo.mp4  icon_128.png  icon_dark.svg  icon_light.svg  icon.svg  inspect.svg

From Chrome console log:

ide.main.92c1f4.js:67 GET http://vscode/thomas/resource/home/coder/.local/share/code-server/extensions/chrome-preview/resources/icon.svg net::ERR_NAME_NOT_RESOLVED

It's served from sub-path vscode/thomas/. You can see that the hostname is missing in the url. It's not just this extension - seems the same for most/ all.

Note that I fetch and unzip the extensions directly from ms marketplace, not from coder.com (waiting on #124) Are they built differently or should they be identical?

Just noticed another one emitted for git extension:

ide.main.92c1f4.js:67 GET http://vscode/thomas/resource/home/travis/build/codercom/code-server/packages/server/build/extensions/git/resources/icons/dark/open-change.svg net::ERR_NAME_NOT_RESOLVED

@t-d-d
Copy link
Author

t-d-d commented May 4, 2019

I've actually found that the issue went away when I deployed behind a newer k8s nginx ingress controller. Which led me to look at how the rewrite rules are generated. Which lead me to find an erroneous extra '/' in my URL!

Closing.

@t-d-d t-d-d closed this as completed May 4, 2019
@trobert2
Copy link

hello @t-d-d, would you mind sharing your ingress definitions?
I am having trouble loading some of the resources myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants