-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
Bug in fs promise APIs #59023
Copy link
Copy link
Closed
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.permissionIssues and PRs related to the Permission ModelIssues and PRs related to the Permission Model
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.permissionIssues and PRs related to the Permission ModelIssues and PRs related to the Permission Model
Type
Fields
Give feedbackNo fields configured for issues without a type.
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