[🐛 Bug]: Worker exits on start with "Unable to deserialize cloned data" on VS Code 1.144 (Electron 43)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript, vscode
- Ambito
- developer-experience
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 8
- Fork
- 5
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di webdriverio/vscode-webdriverio
-
[🐛 Bug]: WDI5 + SauceLabsApertaBug 🐛 Needs Triaging ⏳
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
webdriverio/vscode-webdriverio#121 · 1 commento ·
-
[🐛 Bug]: Debug on TypescriptApertaBug 🐛 Needs Triaging ⏳
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
[💡 Feature]: Release on OpenVSXForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaIdea 💡 Needs Triaging ⏳
Difficoltà 3/5 1-3 ore Idoneità per principianti 22/100
-
[🐛 Bug]: After running a test, the status in the testing panel is not updatedForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaBug 🐛 Needs Triaging ⏳
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
-
Idea 💡 Needs Triaging ⏳
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
Tutte le issue di webdriverio/vscode-webdriverio
Issue simili
-
Postgres upgrade golden leaves fixture URL query parameters in the expected output comparisonAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
garrytan/gbrain#10437 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"Forse già presa @acmerfight l’ha presa oggi. Apertauntriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
earendil-works/pi#12573 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
agentes-chat/agentes-chat#1506 ·
I maintainer di solito rispondono entro 1 giorno
-
comp/desktop desktop/files os/windows P2 type/perf
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
NousResearch/hermes-agent#160359 ·
I maintainer di solito rispondono entro 1 giorno
-
Missing repro Platform: Android
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
software-mansion/react-native-reanimated#11554 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno