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
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
30.0.0
What operating system are you using?
Windows
Operating System Version
Windows 11 (fully updated)
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
Chrome 122+ now has persistent permissions for the File System Access API. In versions of Electron containing Chrome 122+, I expect to be able to set persistent permissions, either via Chrome's UI or via a Web session broker in main. Alternatively, I expect persistent permissions will always be granted.
Actual Behavior
Although there is a new broker for handling File System Access permissions (see #28422 and its resolution in PR #41419 by @codebytere), using this function does not grant persistent permissions. This results in an Electron app using this API being unable to access a file or directory from a file handle stored in a previous session unless the user supplies a gesture (e.g. mouse click). The following error shows in console: DOMException: Failed to execute 'requestPermission' on 'FileSystemHandle': User activation is required to request permissions..
The current behaviour of 30.x means that developers would be forced to use Node FS APIs, and hence complicate their codebase when packaging a PWA as an Electron app.
Testcase Gist URL
No response
Additional Information
It should be noted that in Electron versions up to 29.x, it is possible to bypass the user gesture requirements, and essentially emulate persistent permissions, with the commandline switch enable-experimental-web-platform-features. That switch simply granted all requested permissions.
Please see #28422 (comment) and response below it for further details about this part of the File System Access API not yet being implemented in Electron.
The text was updated successfully, but these errors were encountered:
codebytere
changed the title
[Bug]: Missing support for Persistent Permissions with the File System Access API as of Chrome 122
[Enhancement]: Missing support for Persistent Permissions with the File System Access API as of Chrome 122
May 7, 2024
Preflight Checklist
Electron Version
30.0.0
What operating system are you using?
Windows
Operating System Version
Windows 11 (fully updated)
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
Chrome 122+ now has persistent permissions for the File System Access API. In versions of Electron containing Chrome 122+, I expect to be able to set persistent permissions, either via Chrome's UI or via a Web session broker in
main
. Alternatively, I expect persistent permissions will always be granted.Actual Behavior
Although there is a new broker for handling File System Access permissions (see #28422 and its resolution in PR #41419 by @codebytere), using this function does not grant persistent permissions. This results in an Electron app using this API being unable to access a file or directory from a file handle stored in a previous session unless the user supplies a gesture (e.g. mouse click). The following error shows in console:
DOMException: Failed to execute 'requestPermission' on 'FileSystemHandle': User activation is required to request permissions.
.The current behaviour of 30.x means that developers would be forced to use Node FS APIs, and hence complicate their codebase when packaging a PWA as an Electron app.
Testcase Gist URL
No response
Additional Information
It should be noted that in Electron versions up to 29.x, it is possible to bypass the user gesture requirements, and essentially emulate persistent permissions, with the commandline switch
enable-experimental-web-platform-features
. That switch simply granted all requested permissions.Please see #28422 (comment) and response below it for further details about this part of the File System Access API not yet being implemented in Electron.
The text was updated successfully, but these errors were encountered: