Repository navigation
[Bug] Every path inside app.asar fails: "Cannot mix BigInt and other types" (fs-local probe assumes BigInt stats)
#8842
Replies: 4 comments
这个错误的成因是确定的(BigInt 与 Number 混算)——而同一天已有一条带修复的同类报告1. 机制你在 只可能来自一处:某处用了 BigInt 版的 stat( 而我们平台上出现"只有 2.
|
|
Independent macOS arm64 confirmation + evidence that the whole provider is dropped, not just the failing root Environment: DSH Desktop 0.2.0-rc.2 (installed build 2026-09-29), macOS arm64, default Confirming both halves of the report on this machine:
One extra data point for the "entire provider is dropped" claim: I copied the four shipped For the contrast, another report (#7906) finds Standard mode unaffected on the same install, leaving the preset's Agreeing with the suggestion in #9164: a single unreadable custom root should not take every other configured root with it, and the provider-level skip should be diagnosable from the session, not only from one log line. |
|
2026-10-14 复核:两处缺陷在
补一条此前没贴过的证据,说明这不是回归、而是从未工作过: 旁证: 环境复核:DSH Desktop 修法方向(本线程与 #8815 已有讨论,此处仅作确认): EN: Re-checked on 2026-10-14 — both defects are still present on Evidence that this never worked rather than regressed: in the complete local session-log history no The provider is not rejecting: Environment: DSH Desktop |
Uh oh!
There was an error while loading. Please reload this page.
What happens
On a packaged (asar) installation, any Harness filesystem operation that probes a path inside
app.asarthrows:Two user-visible consequences:
skill-filesystemrow carriescustomSkillDirs: [<…>/@deepseek-ai/dsh-agent-preset/skills], which resolves insideapp.asar.Listing that root throws, and
@deepseek-ai/dsh-skillthen logsskill provider "filesystem" skipped: FsError: cannot list "…": Cannot mix BigInt and other typesand drops the whole provider — so project and user skill roots are lost too, not just the failing
one. Concretely on 0.2.0-rc.2:
skill("cordis-plugin-development")→unknown or no longer available, while a real-directory provider (skill-office) keeps working.read-style call against any…/app.asar/…path fails with the same error, so agents cannot inspect the shipped source, skills, docs or package
manifests.
listDir,stat,writeTextandeditTextall go through the same probe.Environment
masterstill contains the defect (see Root cause).Minimal reproduction
Run with the app's own binary — asar support is active only in Electron, not in plain Node:
Actual output:
Control: the identical call against a real directory (
/Applications) returnsbigintfor every field.That is why the defect is invisible in a source checkout and reproduces only in a packaged build.
Root cause
packages/fs/fs-local/src/fsio.ts—probe()(mode on line 252) andprobeNoFollow()(mode on line 268):fs.stat(path, { bigint: true })is assumed to always return BigInt fields — the type annotations say so(
probeStats<T extends Stats | BigIntStats>,versionOf(info: BigIntStats)). Electron's asar layerignores the
bigintoption and returns plain Numbers, soNumber & BigIntthrows.The shipped bundle shows the same expression compiled:
lib/index.js:243and:258containNumber(info.mode & 511n)— the build turns0o777ninto511n, which is why searchingmasterfor0o777nfinds the source while searching for511nfinds only packaged output.Related, same function:
versionOf()interpolatesinfo.mtimeNs/info.ctimeNs, which areundefinedfor asar stats — no throw, but asar paths get version strings containing
"undefined", soexpected-version change detection is not meaningful there.Suggested fix
Normalize before the bitwise operation, at both sites:
Secondary robustness suggestion
One unreadable root currently removes every filesystem skill, because the skills service catches a
provider-level
list()failure and skips the provider as a whole. Per-root isolation (skip the failingroot, keep the others, surface a per-root diagnostic) would degrade instead of disabling local skill
discovery.
Regression coverage
A unit test that injects a
statreturning Number fields (simulating asar) next to the existing BigIntcase, asserting
probe()returns a numericmodeand does not throw.All reactions