MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: Failed to execute 'showSaveFilePicker' on 'Window
@Master-Ukulele is already working on this.
Since Jul 18, 2024.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
Description
I am current have a blazor project. I was invoking window.showSaveFilePicker from interops. However I have to wait a stream fully processed then show this dialog and I have no clue how long the stream will be finished. (depends on the uploaded file size or if multiple files are selected will be a promise chain) Right now a SecurityError dom exception throw after 1-2 sec. It was asking for user activation.
<Line>Failed to execute 'showSaveFilePicker' on 'Window': Must be handling a user gesture to show a file picker.</Line>
<Line>Error: Failed to execute 'showSaveFilePicker' on 'Window': Must be handling a user gesture to show a file picker.</Line>
Investigation
I checked showSaveFilePicker does require Transient user activation. However in my case I have to wait the stream. I can't find a way to overcome this issue.
Question
Is there any possible ways I can bypass that restriction or manually trigger the activation?
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
No response
SDK Version
No response
Framework
Other
Operating System
Windows 11
OS Version
No response
Repro steps
See Above
Repros in Edge Browser
Yes, issue can be reproduced in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.