Skip to content
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

Webview iconPath not work when using vscode plugin #10585

Closed
jimwu11235 opened this issue Dec 25, 2021 · 2 comments · Fixed by #10434
Closed

Webview iconPath not work when using vscode plugin #10585

jimwu11235 opened this issue Dec 25, 2021 · 2 comments · Fixed by #10434
Labels
duplicate duplicated issues vscode issues related to VSCode compatibility

Comments

@jimwu11235
Copy link

Bug Description:

Webview iconPath not work when using vscode plugin
This issue was reported at #9553 and closed at #9608
But after I update my Theia project from v1.14.0 to v1.21.0,
the webview iconPath is still not working

Steps to Reproduce:

The reproduction steps are same as #9553 with webview example project.

Additional Information

  • Operating System: Windows 10
  • Theia Version: v1.21.0
  • Node Version: v12.14.1
  • Yarn Version: v1.22.17
@colin-grant-work colin-grant-work added the vscode issues related to VSCode compatibility label Dec 29, 2021
@colin-grant-work colin-grant-work self-assigned this Dec 29, 2021
@colin-grant-work
Copy link
Contributor

I'm able to reproduce this on Windows but not in Linux. On Linux, the icon appears correctly; on Windows I get this error:

root ERROR Could not transfer '..\..\..\..\..\..\..\..\c:\Users\me\AppData\Local\Temp\vscode-unpacked\cat-coding-0.0.1.vsix\extension\resources\menu.svg' file from 'demo_cat_coding'

It looks like there's a problem with our identification of absolute paths on Windows or something.

@colin-grant-work
Copy link
Contributor

I believe that this is the same issue described in #10370. Basically, the plugin path URI is correct, but when Uri.joinPath is run, we get a bad result with a double C: drive letter, which is the source of the many ../ in the eventual URL.

root INFO [hosted-plugin: 4852] EFFECTS OF JOINPATH
Before:
URI {
  scheme: 'file',
  authority: '',
  path: '/c:/Users/me/AppData/Local/Temp/vscode-unpacked/cat-coding-0.0.1.vsix/extension',
  query: '',
  fragment: ''
}
After:
URI {
  scheme: 'file',
  authority: '',
  path: '/C:\\c:\\Users\\me\\AppData\\Local\\Temp\\vscode-unpacked\\cat-coding-0.0.1.vsix\\extension\\resources\\menu.svg',
  query: '',
  fragment: ''
}

@colin-grant-work colin-grant-work added the duplicate duplicated issues label Dec 29, 2021
@colin-grant-work colin-grant-work removed their assignment Jan 10, 2022
@colin-grant-work colin-grant-work linked a pull request Jan 10, 2022 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate duplicated issues vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants