[windows] File.readTextSync / File.writeTextSync are stubs — reads yield "undefined", writes silently no-op
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 25.7k
- Fork
- 1.7k
- Merge trung bình
- 4 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 41
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NativeScript/NativeScript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NativeScript/NativeScript#11643 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug css
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NativeScript/NativeScript#11525 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
NativeScript/NativeScript#11639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
NativeScript/NativeScript#11631 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
iOS variable fonts ignore computed font-weight and normal weight defaultsCó thể đã có người làm @aleclarson đã nhận 9 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
NativeScript/NativeScript#11618 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NativeScript/NativeScript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tintinweb/pi-subagents#459 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
danielmiessler/LifeOS#2830 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
freshframework/fresh#3920 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: client enhancement priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
opensro-dev/opensro#3681 ·
Maintainer thường phản hồi trong vòng 1 ngày