Repository navigation
Description
What happened
Installing a valid .dntr archive through Plugin Manager can remain in progress indefinitely during archive extraction. The existing plugin version remains installed, but the temporary installation directory and installer lock remain active until Daintree is fully quit.
The UI does not surface an error, timeout, current archive entry, byte progress, or cancellation control.
Steps to reproduce
- Run packaged Daintree 0.27.0 on macOS.
- Create a valid
.dntrarchive containing an approximately 70,000-byte incompressible file entry. The resulting compressed entry is approximately 70,025 bytes. - Open Plugin Manager.
- Select Install from file and choose the archive.
- Observe that installation does not complete.
A synthetic three-entry archive containing plugin.json, dist/index.js, and dist/payload.bin reproduces the behavior without any third-party plugin code.
Expected behavior
The valid archive finishes extracting and the plugin installation completes, or the installation terminates with an actionable error while releasing its temporary state and installer lock.
Actual behavior
Extraction stops during dist/payload.bin after 65,516 bytes. No further bytes are written and no completion or error is reported.
The installation indicator remains active, .install-tmp-* remains present, and install.lock.lock remains held. If this is an upgrade, the previously installed plugin version remains installed.
A renderer reload does not recover the operation. Fully quitting and reopening Daintree terminates the operation and permits startup cleanup of the stale temporary state.
Environment
- Daintree: 0.27.0
- Previously reproduced in Daintree: 0.26.0
- OS: macOS 26.5.1 on Apple silicon
- Electron: 42.4.0
- Embedded Node: 24.16.0
- Archive reader: yauzl 2.10.0 with fd-slicer 1.1.0
Additional context
The generated fixture produced these results:
| Runtime | Largest compressed entry | Result |
|---|---|---|
| Electron 42 embedded Node 24.16.0 | 60,020 bytes | Passed |
| Electron 42 embedded Node 24.16.0 | 70,025 bytes | Timed out at 65,516 output bytes |
| Standalone Node 22.13.1 | 70,025 bytes | Passed |
The same 70,025-byte fixture also stalls in ELECTRON_RUN_AS_NODE=1 mode, so no renderer, Electron application lifecycle, plugin activation, existing installation, or third-party plugin code is required.
The original packaged-plugin occurrence stopped during a 111,005-byte compressed entry. ZIP integrity validation and extraction with the macOS archive utility both passed.
Activity
gregpriday commentedon Jul 17, 2026
Confirmed, and splitting the repro out to
ELECTRON_RUN_AS_NODE=1is what makes this one cheap to pin down. It's an upstream Node regression, not our install logic.Node 24.16.0 landed nodejs/node#62557, which made
Readable.pause()andresume()no-op once a stream's internaldestroyedflag is set.fd-slicer1.1.0, which is yauzl 2.x's read-stream layer, ends a slice the old way by setting the flag directly instead of callingdestroy():If the write side is applying backpressure at that exact moment, the
resume()that pipe's drain handler would normally fire does nothing, and the final chunk plus the EOF are stranded. Nofinish, noerror, no exit. That's why it's byte-exact at the default 64KiBhighWaterMark, and why it's reliable rather than intermittent on macOS (no io_uring there, so the fs completion always lands in the wrong window). Your 65,516 of 70,025 is exactly that boundary.Tracked upstream as nodejs/node#63487, reverted for 24.x in #63834, shipped in Node 24.18.0. Electron picked it up in 42.6.0 (electron/electron#52105). We resolve
42.4.0in the lockfile, which is Node 24.16.0, so we're sitting right on it. Our^42.4.0range already permits the fix, it just needs the lockfile moved. Current 42.x is 42.7.0.The plan:
42.7.0for Node 24.18.0.yauzland@types/yauzlto^3.4.0. 3.3.1 fixed the same fd-slicer pattern independently (thejoshwolfe/yauzl#169) and 3.x drops thefd-slicerdependency outright. The callback API we use (yauzl.openwithlazyEntries,openReadStream,readEntry,validateFileName) is unchanged, so it should be a drop-in major bump.extractPluginArchive()inelectron/services/PluginArchive.tsuses a rawstream.pipe(out)and only advances onout.on("finish"), with no timeout, no stall detection, and no abort. Moving it tostream.pipelinewith anAbortSignalinactivity guard turns a future silent stall into a catchable error, which is what the installer needs to reach its rollback path at all.On the stuck lock:
installPluginawaitsextractPluginArchiveatPluginInstaller.ts:308with no timeout, so when extraction never settles, thefinallythat removes.install-tmp-*and releases the lock never runs. Thestale: 20_000on theproper-lockfilecall doesn't rescue it either.updateLockre-arms every 10s andutimesthe lockfile, so a hung-but-alive process keeps refreshing its own mtime indefinitely. Stale reclamation only helps when the holder is dead, not when it's wedged. Hence the full quit, and hencesweepStalePluginTempDirs()only ever catching the leftovers at next launch.Worth noting the other two
openReadStream()sites in that file,readArchiveManifest()andverifyPluginArchive(), buffer throughdata/endwith no pipe, so there's no backpressure and no drain-resume to strand. Extraction is the only exposed path.The missing progress and cancel affordances are a real gap but a separate one (
usePluginManager.tsonly tracks a booleanisInstalling), so I'd rather file that on its own than fold it in here.Leaving this open until the bumps and the pipeline guard land.
Merge pull request #11230 from daintreehq/feature/issue-11227-plugin-…