[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
-
難度 2/5 1-3 小時 新手友好度 78/100
tintinweb/pi-subagents#459 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
danielmiessler/LifeOS#2830 ·
維護者通常 6 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
freshframework/fresh#3920 ·
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
area: client enhancement priority: low
難度 2/5 1-3 小時 新手友好度 75/100
opensro-dev/opensro#3681 ·
維護者通常 1 天內回覆