[windows] File.readTextSync / File.writeTextSync are stubs — reads yield "undefined", writes silently no-op
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- backend
调研方向
Start by tracing File.readTextSync() and File.writeTextSync() in @nativescript/core, then compare their Windows implementations with the working async methods. Reproduce the reported behavior in a packaged Windows app and identify the relevant tests or entry points. Done means synchronous reads return file contents and repeated writes update the file on Windows.
由索引模型根据 Issue 内容生成。
描述
On NativeScript Windows (packaged WinUI/MSIX x64 app), the synchronous file APIs in @nativescript/core are non-functional while their async counterparts work:
File.fromPath(p).readTextSync()returns the string"undefined"rather than file contents (feeding it toJSON.parsethrows"undefined" is not valid JSON).File.fromPath(p).writeTextSync(text)returns without throwing but does not modify the file. Subsequent calls in the same process also report success without writing — the file keeps its initial contents regardless of write count.
File.readText() / File.writeText() (async) perform real IO on the same paths.
Evidence: a packaged app calling writeTextSync 18 times per boot (instrumented counter, no thrown errors) produced a file containing only the first write's data; readTextSync of that file threw a JSON parse error on "undefined". This caused a preferences-persistence feature to silently lose every write — a real consumer-facing data-loss path for any app relying on the sync APIs (e.g. settings stores, caches).
Environment: Windows 11 x64 (10.0.26200.9711), packaged MSIX, NativeScript Windows runtime current as of Nov 2026.
- 主要语言
- TypeScript
- 星标
- 25.7k
- 派生
- 1.7k
- 平均合并
- 4 天 2 小时
- 30 天内合并 PR
- 41
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NativeScript/NativeScript 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
NativeScript/NativeScript#11643 ·
维护者通常 1 天内回复
-
bug css
难度 2/5 1-3 小时 新手友好度 70/100
NativeScript/NativeScript#11525 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 22/100
NativeScript/NativeScript#11639 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
NativeScript/NativeScript#11631 ·
维护者通常 1 天内回复
-
iOS variable fonts ignore computed font-weight and normal weight defaults可能已有人在做 @aleclarson 于 9 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
NativeScript/NativeScript#11618 ·
维护者通常 1 天内回复
查看 NativeScript/NativeScript 的全部 Issue
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
难度 2/5 1-3 小时 新手友好度 68/100
openclaw/openclaw#199885 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
-
feature needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
BoardGamesEmpire/board-games-empire-backend#1306 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
sequant-io/sequant#1689 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100