You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to JSON.parse throws "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.
@triniwiz No — the original report was already on the beta runtime: @nativescript/windows1.0.0-beta.24 (core/vite pinned to the abae298 PR #11272 pkg.pr.new builds), packaged x64 MSIX.
Revalidated on beta.24 again today in the same packaged context:
File.readTextSync() on a file with real contents returns undefined (the value, not a string)
File.writeTextSync() returns without throwing but does not reliably write — on a fresh file it produces an empty file, after which async writeText on the same File then throws Windows.Foundation.HResult
File.exists() also returns undefined rather than false for a missing path
Async readText/writeText still perform real IO on the same paths, so the gap is specific to the *Sync projections. Still reproduces.
Activity
triniwiz commentedon Nov 10, 2026
Is this a report from the alpha runtime ?
aleclarson commentedon Nov 10, 2026
@triniwiz No — the original report was already on the beta runtime:
@nativescript/windows1.0.0-beta.24 (core/vite pinned to theabae298PR #11272 pkg.pr.new builds), packaged x64 MSIX.Revalidated on beta.24 again today in the same packaged context:
File.readTextSync()on a file with real contents returnsundefined(the value, not a string)File.writeTextSync()returns without throwing but does not reliably write — on a fresh file it produces an empty file, after which asyncwriteTexton the sameFilethen throwsWindows.Foundation.HResultFile.exists()also returnsundefinedrather thanfalsefor a missing pathAsync
readText/writeTextstill perform real IO on the same paths, so the gap is specific to the*Syncprojections. Still reproduces.triniwiz commentedon Nov 11, 2026
You can try updating the pkg version to
4fe2d65windows supported core or3456c82linux supported core with some extra core fixes