-
Notifications
You must be signed in to change notification settings - Fork 24
fix: work around VS Code >= 1.123 webview resource corruption in IT runs #1476
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
Merged
lordrip
merged 3 commits into
KaotoIO:main
from
lordrip:fix/issue-1468-webview-corruption-workaround
Aug 11, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
.yarn/patches/vscode-extension-tester-npm-8.24.0-62b74258e3.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| diff --git a/out/browser.js b/out/browser.js | ||
| index 1bd673e101e4d1b3e8fd9ef427c4de675d3961e6..b23512577e05517b0154e7c21718bd280b1cdc9f 100644 | ||
| --- a/out/browser.js | ||
| +++ b/out/browser.js | ||
| @@ -312,6 +312,21 @@ class VSBrowser { | ||
| if (paths.length === 0) { | ||
| return; | ||
| } | ||
| + // Workaround for microsoft/vscode#330243 (see also | ||
| + // redhat-developer/vscode-extension-tester#2454): `CodeUtil.open` spawns a | ||
| + // second-instance CLI call, and when that lands while VS Code is still | ||
| + // starting up, VS Code >= 1.123.0 duplicates every 256 KiB chunk of every | ||
| + // webview resource in the window AND the webview service worker caches the | ||
| + // corrupted responses, permanently poisoning the profile. Waiting for the | ||
| + // workbench element alone is not enough - it appears while the race window | ||
| + // is still open - so the first open of a session additionally waits for the | ||
| + // instance to settle. | ||
| + if (!VSBrowser._openResourcesSettled) { | ||
| + await this.waitForWorkbench(); | ||
| + const settleMs = Number(process.env.EXTESTER_OPEN_RESOURCE_SETTLE_MS ?? 10000); | ||
| + await new Promise((resolve) => setTimeout(resolve, settleMs)); | ||
| + VSBrowser._openResourcesSettled = true; | ||
| + } | ||
| const code = new codeUtil_1.CodeUtil(this.storagePath, this.releaseType, this.extensionsFolder); | ||
| code.open(...paths); | ||
| await this.waitForWorkbench(undefined, waitForFn); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.