-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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 blank after a reload #98746
Comments
When did you start hitting this issue? Only in the most recent insiders build? |
Also, the code stream extension will not start for me in the OSS build:
Looks like |
Correct, no reports for the stable version.
It's possible you're having a proxy/connection issue... if you don't see an OK response here (https://api.codestream.com/no-auth/status) then there's a connection/proxy issue. If you don't mind could you email me (brian@codestream.com) the |
Just to make sure, you only started seeing this in the insiders build that came out in the last 24 hours? The status says ok. Its possible that this is because I'm using a development build of VS Code (which makes debugging much easier) Here are the agent logs:
And the main
|
Our first report of it was on May 26, 5:07 PM Eastern, I wasn't able to reproduce it myself until the latest insiders today (1.46.0-insider) and only on OSX (Darwin x64 18.7.0) [not Windows 10]
that's a strange error as it appears like |
I cannot get it to work in the open source builds How can I test this in the insiders builds? It doesn't seem like code stream uses webview serializers but instead creates a new webview on reload? Is that correct? |
I see what you're saying now, I was installing from a vsix earlier, the install from the marketplace problem seems to be more widespread than just CodeStream though... this is the version that was failing for us (same version as marketplace) Correct, no webview serializer. |
I've realized that you might need credentials to actually see the issue (by default the panel won't be auto-opened unless you're auto-signed in). i can provide them to you at brian@codestream.com |
Looks like downloading from the marketplace has been fixed with a recent Insiders release. Also, after a few dozen reloads with VSC Insiders 1.45.0, not once did I encounter a blank webview. Version: 1.45.0-insider (system setup) |
Ok, I created test account and added some comments but I'm not to reproduce the issue on Mac, even after reloading the window many times. Were users only seeing this on windows? Are there any more specific steps to reproduce it? |
I cannot reproduce this and without a repro, I can't really investigate it either What does this look like from your extension's point of view? Are you still creating a webview? Does it appear in the normal state? |
Let me create a build on our end with an over abundance of logging so I can better answer you. |
I think this is related to #98776. Even with
Version: 1.46.0-insider With the stable version of VS Code, the webview is restored. Version: 1.45.1 |
@tamuratak Are there any error logs when this happens? Any thing special about your environment or the folder you have open? I can't repo with the example extension. The only difference in setup is that I'm on |
In the above example, no folder is opened. The webview is not restored sometimes. It is restored sometimes. The following is the console log of VS Code when it is not restored:
At this moment, the webview is blank. Then, I click the tab of
|
I have tried With the following patch, I execute the above steps with diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
index bdffe18a85..27d00f0290 100644
--- a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
+++ b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
@@ -131,7 +131,13 @@ class WebviewProtocolProvider extends Disposable {
ipcRenderer.send('vscode:registerWebview', this.id, {
extensionLocation: this.extension?.location.toJSON(),
- localResourceRoots: initialLocalResourceRoots.map(x => x.toJSON()),
+ localResourceRoots: initialLocalResourceRoots.map(x =>
+ {
+ console.log(`x.toJSON: ${x.toJSON}`)
+ console.log(`x: ${x}`)
+ console.log(JSON.stringify(x));
+ return x.toJSON();
+ }),
});
this._ready = new Promise((resolve) => { Then I have got the following messages on the terminal when reloading the window.
|
Thanks @tamuratak for the detailed investigation! I believe I fixed that specific bug with a42fc90. Are you still seeing this when using the latest change from VS Code master? |
Yes, about once in ten times. The frequency has decreased very much. But, I have to say I still see this issue. The following is the log in the terminal when the webview is blank.
|
We can only send URI components over from the extension host to the renderer process. Make sure the typings reflect that Follow up on #98746
@bcanzanella and @tamuratak Can you please test the next VS Code insiders build. It includes af50025 which may fix this problem (although since I can't reproduce this myself I'm not sure if it does or not) |
The issue I reported seems to be fixed. Version: 1.46.0-insider |
Looks good here. Version: 1.46.0-insider (user setup) Version: 1.46.0-insider |
Based on users response adding verified label. |
I have begun to encounter the same issue with the latest Insiders. @bcanzanella, how about you? Version: 1.47.0-insider |
I have not seen it yet @tamuratak, as I'm in windows, but a teammate of mine on OSX has, they are running: Version: 1.47.0-insider |
… up on Since webviews load on a different process, it may be possible that they load and start firing events before we have hooked up all the listeners we are interested in. To fix, this defer setting the actual content on the webview until the listeners have been hooked up for sure Possible cause of #98746 but since I can't repo I can't confirm
This is probably because I reverted the revert that fixed this :) I've added a bunch of logs to hopefully investigate what is going on. Please test out next insiders build (it should be the build after 84f52fe) and collect these logs if you still see the problem:
In the console, there should be logs talking about webviews. For example: Please share these logs since I cannot reproduce the problem myself |
The issue seems to be fixed. Version: 1.47.0-insider |
Here is a log of it happening for me with the latest insiders... Version: 1.47.0-insider (user setup)
|
Please test in the next insiders build. The current one has a known issue: #100879 |
I believe this is what I'm coming across, though it's possible the root cause may be different. For reference, my case appears to be the same as mhutchie/vscode-git-graph#301. Version: 1.47.0-insider
|
I do not see this issue anymore. Version: 1.47.0-insider |
I believe this should be fixed so let me know if you are still seeing this in the 7923112 insiders build |
I still see my error case, but if you think it's different in some way, I'm happy to move to another ticket for it. Version: 1.47.0-insider |
@jimcottrell Yes your log suggests that something else is going wrong ( |
VSCode Version: 1.46.0-insider
OS Version: Darwin x64 18.7.0
Version: 1.46.0-insider
Commit: 1d268b7
Date: 2020-05-28T08:45:32.560Z
Electron: 7.3.0
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 18.7.0
Steps to Reproduce:
Reload
command palette command to reload VSCode Insiders.For me, it's blank ~30% of the time after a reload, though a colleague sees it closer to 100% after a reload.
I have a screen capture of it happening here: https://www.dropbox.com/s/jhp8cjzty8itr7w/vscode-insiders.mov?dl=0
We had a similar, related issue previously #89038, we have since updated to use
asWebviewUri
-- hard to say if that's still the problem in this case as there's nothing in the VSC dev tools window related to that. When this happens, the webview seems completely dead, you can't use theOpen the Webview Developer Tools
(nothing happens).Does this issue occur when all extensions are disabled?: Yes, though it's related to a singular extension
The text was updated successfully, but these errors were encountered: