-
-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Bug in fs promise APIs #59023
Copy link
Copy link
Closed
Labels
fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.permissionIssues and PRs related to the Permission Model.Issues and PRs related to the Permission Model.
Description
Activity
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.permissionIssues and PRs related to the Permission Model.Issues and PRs related to the Permission Model.
Version
main
Platform
Subsystem
fs
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
throw an error:
Error: Access to this API has been restricted. Use --allow-fs-write to manage permissions.What do you see instead?
throw and error:
TypeError: Method Promise.prototype.then called on incompatible receiver undefined.Additional information
This is because C++ layer does not return the promise to JS layer(just reject the promise in C++ layer) when an error occurs(Libuv error or permission error).
Refs: #58747 and #58996