[🐛 Bug]: Worker exits on start with "Unable to deserialize cloned data" on VS Code 1.144 (Electron 43)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, typescript, vscode
調査の方向性
The birpc serializer is set in packages/vscode-wdio-server/src/worker.ts (around lines 184-185) and packages/vscode-wdio-worker/src/client.ts (around lines 57-58), and both use v8.serialize/v8.deserialize. Start with the repro in iamphduc/vscode-wdio-v8-repro and repro-v8.ps1 to confirm the version mismatch. Done when both sides use a version-independent format, the Testing panel lists specs without the 'Unable to deserialize' error, and the maintainers have agreed how values like Error objects are handled.
索引モデルが issue の本文から書いたものです。
説明
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Extension Version
0.4.2
WebdriverIO Version
10.1.0
Node.js Version
v26.13.0 (v24.16.0 fails the same way). VS Code 1.144.0 (Electron 43.8.3), Windows 11.
Which capabilities are you using?
N/A
What happened?
The Testing panel lists the config files, but they have no tests and can't be expanded.
With "webdriverio.logLevel": "debug", the log shows this sequence:
- The worker starts and connects to the extension server.
- When it reads the first message, it exits with
Error: Unable to deserialize cloned data due to invalid or unsupported version. - 60 s later, discovery fails with
[birpc] timeout on calling "loadWdioConfig". - Each refresh after that fails with
Worker not connected.
Cause
The extension host and the worker send their birpc messages in V8's binary format (the same on main today):
packages/vscode-wdio-server/src/worker.ts#L184-L185:serialize: v8.serialize, deserialize: (v) => v8.deserialize(Buffer.from(v) as any)packages/vscode-wdio-worker/src/client.ts#L57-L58: the same.
The two sides run on different V8 versions:
- The extension host runs on VS Code's Electron 43: V8 15.0.
- The worker runs on the system Node.js (
webdriverio.nodeExecutableornode): Node.js 26.13 has V8 14.6.
v8.serialize writes its format version in the header, and v8.deserialize refuses a version newer than its own. V8 15.0 writes format version 16, which V8 14.6 can't read, so the worker can't read the messages (see the check under "How to reproduce"). A Node.js upgrade doesn't help: I upgraded from 24.16 to 26.13 and got the same error.
Workaround (tested for test discovery only)
Use JSON on both sides. I changed the installed build (dist/extension.cjs and dist/worker.cjs) to serialize: JSON.stringify, deserialize: (v) => JSON.parse(String(v)). After this change, the Testing panel lists all specs. I haven't checked test runs from the panel: values that JSON can't carry (such as Error objects) may lose detail.
What is your expected behavior?
The worker starts, and the Testing panel lists the tests of each config.
The messages between the extension host and the worker use a format that doesn't depend on the V8 version, such as JSON.
How to reproduce the bug.
Minimal example: https://github.com/iamphduc/vscode-wdio-v8-repro (a minimal WebdriverIO project and a PowerShell script).
I checked it in a clean VS Code window (empty profile, the extension 0.4.2 as released):
- Clone the repo and run
npm install. - Open the folder in VS Code 1.144 (Electron 43) with extension 0.4.2.
- Set
"webdriverio.logLevel": "debug"and open the Testing panel. wdio.conf.jsshows no tests, and the "WebdriverIO" output shows the error below.
To see the cause without the extension, write a value with VS Code's V8 and read it with Node.js (PowerShell; the repo has it as repro-v8.ps1). Code.exe can't write to a pipe, so it writes a file:
# Write with VS Code's V8 (Electron runs as Node.js)
$env:ELECTRON_RUN_AS_NODE = '1'
Start-Process "<VS Code folder>\Code.exe" -ArgumentList '-e', '"require(''fs'').writeFileSync(''data.bin'', require(''v8'').serialize(1))"' -Wait -NoNewWindow
Remove-Item Env:ELECTRON_RUN_AS_NODE
# Read with the system Node.js
node -e "require('v8').deserialize(require('fs').readFileSync('data.bin'))"
Result on my machine (the same steps, with the versions and bytes printed):
VS Code side: electron 43.8.3, node 24.22.1, v8 15.0.245.31-electron.0
VS Code side wrote 4 bytes: FF-10-49-02 <- FF 10 = serializer format version 16
Node side: node v26.13.0, v8 14.6.202.34-node.40
Error: Unable to deserialize cloned data due to invalid or unsupported version.
Relevant log output
Output "WebdriverIO", log level debug, from the worker start (Node.js v26.13.0):
[10-30 01:39:02-07:00] [DEBUG] Resolved executable path: C:\Program Files\nodejs\node.EXE
[10-30 01:39:02-07:00] [DEBUG] Starting WebdriverIO worker #1 on port 63527
[10-30 01:39:02-07:00] [DEBUG] Worker path: c:\Users\<user>\.vscode\extensions\webdriverio.vscode-webdriverio-0.4.2\dist\worker.cjs
[10-30 01:39:02-07:00] [DEBUG] Worker cwd: <project>
[10-30 01:39:02-07:00] [DEBUG] [#1] IdleMonitor started
[10-30 01:39:02-07:00] [DEBUG] [#1] Worker process started successfully
[10-30 01:39:02-07:00] [DEBUG] [server manager] server was registered: <project>
[10-30 01:39:02-07:00] [DEBUG] [server manager] detecting server: <project>
[10-30 01:39:02-07:00] [DEBUG] [WORKER #1] Starting WebdriverIO worker (PID: 50332)
[10-30 01:39:02-07:00] [DEBUG] [WORKER #1] Connecting the extension server: ws://localhost:63527
[10-30 01:39:02-07:00] [DEBUG] [Worker#1 stderr] node:v8:527
der.readHeader();
^
Error: Unable to deserialize cloned data due to invalid or unsupported version.
at Object.deserialize (node:v8:527:7)
at deserialize (c:\Users\<user>\.vscode\extensions\webdriverio.vscode-webdriverio-0.4.2\dist\worker.cjs:14:3748)
at e.S (c:\Users\<user>\.vscode\extensions\webdriverio.vscode-webdriverio-0.4.2\dist\worker.cjs:9:5674)
at e.emit (node:events:514:20)
at ot.oi (c:\Users\<user>\.vscode\extensions\webdriverio.vscode-webdriverio-0.4.2\dist\worker.cjs:1:38152)
at ot.emit (node:events:514:20)
at ot.dataMessage (c:\Users\<user>\.vscode\extensions\webdriverio.vscode-webdriverio-0.4.2\dist\worker.cjs:1:15362)
at ot.getData (c:\Users\<user>\.vscode\extensions\webdriverio.vscode-webdriverio-0.4.2\dist\worker.cjs:1:14567)
at ot.startLoop (c:\Users\<user>\.vscode\extensions\webdriverio.vscode-webdriverio-0.4.2\dist\worker.cjs:1:11137)
at ot._write (c:\Users\<user>\.vscode\extensions\webdriverio.vscode-webdriverio-0.4.2\dist\worker.cjs:1:10422)
Node.js v26.13.0
[10-30 01:39:02-07:00] [DEBUG] Worker connection closed
[10-30 01:39:02-07:00] [DEBUG] [#1] IdleMonitor stopped
[10-30 01:39:02-07:00] [DEBUG] Worker#1 process exited with code 1
[10-30 01:40:02-07:00] [DEBUG] Health check: Worker not connected
[10-30 01:40:02-07:00] [ERROR] Failed to discover tests: [birpc] timeout on calling "loadWdioConfig"
[10-30 01:40:02-07:00] [ERROR] Failed to discover tests: [birpc] timeout on calling "loadWdioConfig"
A manual refresh in an earlier session (Node.js v24.16.0, same crash at start):
[10-30 00:57:37-07:00] [INFO] Refreshing WebdriverIO tests...
[10-30 00:57:37-07:00] [ERROR] Failed to discover tests: Worker not connected
[10-30 00:57:37-07:00] [ERROR] Failed to discover tests: Worker not connected
Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
- 主要言語
- TypeScript
- スター
- 8
- フォーク
- 5
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
webdriverio/vscode-webdriverio のほかの issue
-
Bug 🐛 Needs Triaging ⏳
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
webdriverio/vscode-webdriverio#121 · コメント 1 件 ·
-
Bug 🐛 Needs Triaging ⏳
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
[💡 Feature]: Release on OpenVSX再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンIdea 💡 Needs Triaging ⏳
難易度 3/5 1〜3時間 初心者へのやさしさ 22/100
-
[🐛 Bug]: After running a test, the status in the testing panel is not updated再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンBug 🐛 Needs Triaging ⏳
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
Idea 💡 Needs Triaging ⏳
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
webdriverio/vscode-webdriverio の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
rel: fix
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Deltares/fews-web-oc#2400 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
ardia-browser/ardia#4426 ·
メンテナーはふだん 1 日以内に返信
-
Bug report: isValidISODateDashOnly accepts text before or after the date-time対応中かも @bardrop が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
pnp/cli-microsoft365#7713 ·
メンテナーはふだん 1 日以内に返信
-
Diagram: Journey Type: Bug / Error
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
mermaid-js/mermaid-v13#1293 ·
メンテナーはふだん 1 日以内に返信