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

vscode-insiders: Webview contents not loading #317

Closed
morganlombard opened this issue Jun 2, 2020 · 33 comments
Closed

vscode-insiders: Webview contents not loading #317

morganlombard opened this issue Jun 2, 2020 · 33 comments
Assignees
Labels
vscode-bug Something isn't working in Visual Studio Code, that affects Git Graph and all other extensions.

Comments

@morganlombard
Copy link

Describe the Bug
With the latest VSCode insider release Version: 1.46.0-insider the graph does not show. The Git Graph panel opens, only showing
Repo:
Branches:
[Checkbox] Show Remote Branches

This is both Windows 10 and Ubuntnu 20.04

Steps to Reproduce
Steps to reproduce the behaviour:

  1. Open VSCode
  2. Click on 'Git Graph' in bottom left of status bar
  3. Do not see Graph.

Expected Behaviour
Expect to see a Graph of commits and branches.

Environment
Ubuntu 20.04
Version: 1.46.0-insider
Commit: 1bfa086adb9271ff56be11821da686e4cfffb672
Date: 2020-06-02T06:55:30.074Z
Electron: 7.3.0
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.0-33-generic
Git Graph v1.23.0

Windows 10
Version: 1.46.0-insider (system setup)
Commit: 1bfa086adb9271ff56be11821da686e4cfffb672
Date: 2020-06-02T06:55:33.079Z
Electron: 7.3.0
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041
Git Graph v1.23.0

Screenshots (optional)
Screenshot from 2020-06-02 15-22-22

@morganlombard morganlombard added the bug Something isn't working label Jun 2, 2020
@mhutchie mhutchie changed the title Not showing graph vscode-insiders: Webview contents not loading Jun 2, 2020
@mhutchie
Copy link
Owner

mhutchie commented Jun 2, 2020

Hi @morganlombard,

I believe this is being caused by #305 (please read the full thread for more context of this change). Provided this is what's occurring (seems highly likely), I'll have a beta fix available for this soon.

@mhutchie mhutchie changed the title vscode-insiders: Webview contents not loading vscode-insiders: Webview contents not loading (fixed, released in next vscode-insiders build) Jun 2, 2020
@mhutchie
Copy link
Owner

mhutchie commented Jun 2, 2020

After making the vscode team aware of this bug, they have implemented a fix to resolve it (as it relates to all extensions that use a Webview). It will hopefully be included in the next vscode-insiders build, which will allow Git Graph to work again in vscode-insiders.

@nxyd
Copy link

nxyd commented Jun 3, 2020

Same in today's vscode-insiders build.

@matthewapeters
Copy link

"Me too" on OSx:

Version: 1.46.0-insider
Commit: 595d2b9b916d063aadfc2c1a8c8f6df5b45572a8
Date: 2020-06-03T05:38:33.098Z (16 hrs ago)
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 18.7.0

@mjbvz
Copy link

mjbvz commented Jun 4, 2020

This should be fixed in the next VS Code insiders (I fixed the original bug the caused this yesterday and then proceeded to break it again in an interesting new way!)

@HalfBottleOfMind
Copy link

Fixed in

Version: 1.46.0-insider (user setup)
Commit: c7a37c4400bb4c1b92eeeaea1bcacc9ec3789ef3
Date: 2020-06-04T08:37:48.091Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363

@mhutchie mhutchie removed the bug Something isn't working label Jun 5, 2020
@mhutchie
Copy link
Owner

mhutchie commented Jun 5, 2020

Closing this now, as it has been fixed in the latest vscode-insiders build for almost a day now.

@mhutchie mhutchie closed this as completed Jun 5, 2020
@volopasse
Copy link

FYI for anyone coming across this issue, seems to have regressed in 1.47.x

Version: 1.47.0-insider (user setup)
Commit: b9d7ec9ff367a8e59fe4cc2abee605a55be180e8
Date: 2020-06-20T00:08:33.687Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

@Smoovsky
Copy link

FYI for anyone coming across this issue, seems to have regressed in 1.47.x

Version: 1.47.0-insider (user setup)
Commit: b9d7ec9ff367a8e59fe4cc2abee605a55be180e8
Date: 2020-06-20T00:08:33.687Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

Yes, experiencing the same problem in the latest insider's build

@mhutchie mhutchie changed the title vscode-insiders: Webview contents not loading (fixed, released in next vscode-insiders build) vscode-insiders: Webview contents not loading Jun 24, 2020
@mhutchie mhutchie reopened this Jun 24, 2020
@mhutchie
Copy link
Owner

@mjbvz The bug described below is preventing all Git Graph users that use Visual Studio Code Insiders from using the extension (and affects all extensions that use Webview's) - it is different from the bug you previously fixed. Here's some additional background information:

Starting around Visual Studio Code 1.43.0 (give or take a release), immediately after the vscode release some users intermittently observed that Visual Studio Code would fail to load resources via the vscode-resource scheme. I can also confirm that it occurred using the old direct-set method of vscode-resource, and using the new asWebviewUri method. It has been reported by users on Windows, Mac & Ubuntu (so isn't platform specific). It was fixed for about three weeks, and just a few days ago it started to intermittently affect users. However, in today's insiders build, it seems to not work for everyone, I've got heaps of reports of it.

image

@mhutchie mhutchie added the vscode-bug Something isn't working in Visual Studio Code, that affects Git Graph and all other extensions. label Jun 24, 2020
@JustinGrote
Copy link

JustinGrote commented Jun 24, 2020

NINJA EDIT: Looks like next insiders will have it fixed: microsoft/vscode#100918 (comment)

@mhutchie mhutchie changed the title vscode-insiders: Webview contents not loading vscode-insiders: Webview contents not loading (fixed, released in next vscode-insiders build) Jun 24, 2020
@JustinGrote
Copy link

@mhutchie latest insiders works again for me in newest 1.47.0-insider released today
image

@mhutchie
Copy link
Owner

It seems to be broken again in the next Insiders build:

Version: 1.47.0-insider (user setup)
Commit: 6c235c723cb2d8defb840f732eac620f54aa8b9d
Date: 2020-06-26T06:20:06.931Z
Electron: 8.3.3
Chrome: 80.0.3987.165
Node.js: 12.13.0
V8: 8.0.426.27-electron.0
OS: Windows_NT x64 10.0.18362

@cmendible
Copy link

Yep, @mhutchie I can confirm that it's broken again...

Version: 1.47.0-insider (user setup)
Commit: 6c235c723cb2d8defb840f732eac620f54aa8b9d
Date: 2020-06-26T06:20:06.931Z
Electron: 8.3.3
Chrome: 80.0.3987.165
Node.js: 12.13.0
V8: 8.0.426.27-electron.0
OS: Windows_NT x64 10.0.18363

@mhutchie mhutchie changed the title vscode-insiders: Webview contents not loading (fixed, released in next vscode-insiders build) vscode-insiders: Webview contents not loading Jun 26, 2020
@mhutchie
Copy link
Owner

I've raised this with Microsoft again, hopefully it will be fixed soon...

@mhutchie
Copy link
Owner

Webviews are now working again in Visual Studio Code Insiders:

  • Version: 1.47.0-insider (user setup)
  • Commit: 9bf6af04dcb5c2e531cedca83cd188939ca1b0db
  • Date: 2020-06-26T18:55:07.038Z
  • Electron: 8.3.3
  • Chrome: 80.0.3987.165
  • Node.js: 12.13.0
  • V8: 8.0.426.27-electron.0
  • OS: Windows_NT x64 10.0.18362

@JustinGrote
Copy link

@mhutchie confirmed working for me, thanks for going to bat with the code team on that one.

@volopasse
Copy link

volopasse commented Jun 27, 2020

Sadly doesn't work here:

Version: 1.47.0-insider (user setup)
Commit: 9bf6af04dcb5c2e531cedca83cd188939ca1b0db
Date: 2020-06-26T18:55:07.038Z
Electron: 8.3.3
Chrome: 80.0.3987.165
Node.js: 12.13.0
V8: 8.0.426.27-electron.0
OS: Windows_NT x64 10.0.19042

The difference with above may be that I'm using it in WSL. Also the error is slightly different
git-graph-error

@mhutchie
Copy link
Owner

mhutchie commented Jun 27, 2020

@volopasse I've just tried Git Graph in WSL with the same Visual Studio Code Insiders release as you're using, and everything is working fine for me. I also haven't had any reports of issues since my previous response above.

What is the full path of out.min.css & out.min.js, and can you locate it on the file system?

@volopasse
Copy link

Yep, both files are in ~/.vscode-server-insiders/extensions/mhutchie.git-graph-1.24.0/media. Both have contents in the file system, as in they are not empty. However, in the resource viewer the .css is blank

git-graph-resources

git-graph-path

I might spin up a new WSL with another distro to see if it persists

@mhutchie
Copy link
Owner

@volopasse That's really interesting, it would be great if you could spin up a new WSL and see if it persists.

@volopasse
Copy link

volopasse commented Jun 27, 2020

Spun up a brand new WSL (Ubuntu 20), same thing, 404's on the two network resources. Output > Git Graph appears to process the repo correctly:

[2020-06-27 13:14:51.145] Starting Git Graph ...
[2020-06-27 13:14:51.166] Using git (version: 2.25.1)
[2020-06-27 13:14:51.170] Started Git Graph - Ready to use!
[2020-06-27 13:14:51.171] Searching workspace for new repos ...
[2020-06-27 13:14:51.175] > git rev-parse --show-toplevel
[2020-06-27 13:14:51.209] Added new repo: /home/volopasse/gitgraph-test
[2020-06-27 13:14:51.211] Completed searching workspace for new repos
[2020-06-27 13:14:51.211] Showing "Git Graph" Status Bar Item
[2020-06-27 13:14:52.397] Created Git Graph View

But nothing shows up because the resources could not be loaded

VSCode Release (with the following build details) loads the same repo correctly. However, the URIs are different: Release version has vscode-resource://file///<path>, Insiders has vscode-webview-resource://<some uuid>/file///<path>. Anything else I can give you to help troubleshoot?

EDIT: here are the actual build details for a working Release version

Version: 1.46.1 (user setup)
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:13:20.174Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19042

@mhutchie
Copy link
Owner

@volopasse, Thanks for the additional information. I've been experimenting and still can't observe the 404's you're getting in WSL.

The team at Microsoft have been been rewriting the Webview implementation this iteration, which has been causing all of the bugs we've had recently in the Visual Studio Code Insiders build.

The URI scheme change from vscode-resource://file///<path> to vscode-webview-resource://<some uuid>/file///<path> is just one of these changes. This scheme change has been working for me on Windows, Mac, Windows WSL & Mac Docker, so it shouldn't be the cause.

Would you mind raising this Visual Studio Code Insiders WSL Webview issue you're observing to the vscode team? With all their Webview changes it seems highly likely that this is a bug that they need to resolve. If it's affecting you using Git Graph, it will likely be affecting others who use WSL and any of the extensions that use Webviews. I'll keep an eye out for it, and will provide additional assistance if necessary.

@volopasse
Copy link

Absolutely, will do. I appreciate there's not much you can do if it's upstream of your code, and you can't observe it yourself!

@volopasse
Copy link

Managed to narrow it down, turns out the issue is specifically with WSL2! Now posted on the VSCode issue tracker

@mhutchie
Copy link
Owner

Thanks @volopasse, that’s really useful to know if anyone else is having this issue!

@LongLiveCHIEF
Copy link

I don't think it's specifically for WSL2, I'm on OSx and I'm experiencing this bug as well.

Version: 1.47.0-insider
Commit: 0913b1aa43191d8af0ccb4a133d9a8d7c1a81d69
Date: 2020-06-23T09:38:28.751Z
Electron: 8.3.3
Chrome: 80.0.3987.165
Node.js: 12.13.0
V8: 8.0.426.27-electron.0
OS: Darwin x64 19.5.0

@mhutchie
Copy link
Owner

mhutchie commented Jun 30, 2020

@LongLiveCHIEF The version of Visual Studio Code Insiders you have (0913b1aa43191d8af0ccb4a133d9a8d7c1a81d69) is one of the releases from last week with the main bug, updating to the latest Visual Studio Code Insiders release should fix it for you. Please confirm that your able to use Git Graph again once you've updated to at least:

  • Version: 1.47.0-insider (user setup)
  • Commit: 9bf6af04dcb5c2e531cedca83cd188939ca1b0db
  • Date: 2020-06-26T18:55:07.038Z

@volopasse
Copy link

Seems to be fixed in e96aaa0, can see it working in the latest release

Version: 1.47.0-insider (user setup)
Commit: 04545fa88043fd10d1f3edefd26be1b8245b516f
Date: 2020-07-02T05:48:37.715Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19042

@JustinGrote
Copy link

Has stayed fixed for me for a couple days now.

@mfmayer
Copy link

mfmayer commented Nov 17, 2020

I'm still observing this, especially after sleep/hibernate. In such case gitgraph must be closed and reopened. That's a pitty because otherwise I would pin gitgraph tab in VSCode.

Version: 1.51.1 (system setup)
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:34:32.027Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18363

@mhutchie
Copy link
Owner

Hi @mfmayer,

For the most part this issue has seemed to be resolved by the Visual Studio Code team for the last few months. Only a handful of users have continued observe this Visual Studio Code issue, and the common cause to all of them is that they're using WSL2. Are you using WSL2?

  • If so, I think there's probably still an open issue in vscode for it.
  • If not, please raise it as a bug in vscode - if another Visual Studio Code bug has been introduced, it's important to make sure the vscode team is aware of it, as this issue affects all extensions that use Webviews.

@tritemio

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode-bug Something isn't working in Visual Studio Code, that affects Git Graph and all other extensions.
Projects
None yet
Development

No branches or pull requests