Skip to content

VS Code Web version tries to load local resource #19

@AdamRaichu

Description

@AdamRaichu
Contributor

Describe the bug

When using in vscode.dev,

To Reproduce
Steps to reproduce the behavior:

  1. Open AdamRaichu/vscode-zip-viewer in vscode.dev. here
  2. Open the GitHub Actions view.
  3. Under the "WORKFLOWS" tab, expand "Publish Extension".
  4. The icons do not load.

Expected behavior

The icons should have loaded.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Extension Version
v1.25.1

Additional context
The following errors were generated by the console following the steps above.

Not allowed to load local resource: file:///GitHub/vscode-github-actions/0.25.1/extension/resources/icons/dark/workflowruns/wr_success.svg
Not allowed to load local resource: file:///GitHub/vscode-github-actions/0.25.1/extension/resources/icons/dark/workflowruns/wr_failure.svg

I believe this error was caused by the method used to generate the icon paths. Perhaps using vscode.Uri.joinPath(extensionUri, "resources", "icons", "light OR dark", relativeIconPath) would work better.

export function getAbsoluteIconPath(relativeIconPath: string): {
light: string | vscode.Uri;
dark: string | vscode.Uri;
} {
return {
light: _context.asAbsolutePath(`resources/icons/light/${relativeIconPath}`),
dark: _context.asAbsolutePath(`resources/icons/dark/${relativeIconPath}`)
};
}

Activity

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

      Participants

      @AdamRaichu

      Issue actions

        VS Code Web version tries to load local resource · Issue #19 · github/vscode-github-actions