Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useFileSystemAccess updateData fails #3779

Open
7 tasks done
PhE opened this issue Feb 8, 2024 · 0 comments
Open
7 tasks done

useFileSystemAccess updateData fails #3779

PhE opened this issue Feb 8, 2024 · 0 comments

Comments

@PhE
Copy link
Contributor

PhE commented Feb 8, 2024

Describe the bug

Calling updateData() on a modified file fails:

filesystem:1 Uncaught (in promise) DOMException:
The requested file could not be read, typically due to permission problems
that have occurred after a reference to a file was acquired.

Note that if the underlying file is not modified, updateData() does not fail ... but is useless.

Reproduction

This commit adds an update button to the demo page to reproduce the bug

  1. go to the http://localhost:5173/core/useFileSystemAccess/ page
  2. click Open and select any dummy.txt file
  3. click Update button, no error
  4. modify the underlying dummy.txt, save it
  5. click Update button, the erro occurs

System Info

System:
    OS: Linux 6.5 Ubuntu 23.10 23.10 (Mantic Minotaur)
    CPU: (16) x64 AMD Ryzen 7 7840U w/ Radeon 780M Graphics
    Memory: 17.15 GB / 28.11 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.13.0 - /usr/bin/node
    Yarn: 1.22.19 - ~/node_modules/.bin/yarn
    npm: 9.2.0 - /usr/bin/npm
    pnpm: 8.15.1 - ~/src/vueuse/node_modules/.bin/pnpm
    bun: 1.0.6 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 121.1.62.156
    Chrome: 121.0.6167.160
  npmPackages:
    @vueuse/core: workspace:* => 10.7.2 
    @vueuse/integrations: workspace:* => 10.7.2 
    @vueuse/math: workspace:* => 10.7.2 
    @vueuse/rxjs: workspace:* => 10.7.2 
    @vueuse/shared: workspace:* => 10.7.2 
    vue: ^3.4.15 => 3.4.15

Used Package Manager

pnpm

Validations

PhE added a commit to PhE/vueuse that referenced this issue Feb 8, 2024
PhE added a commit to PhE/vueuse that referenced this issue Feb 8, 2024
* add a button to test updateData() in the useFileSystemAccess demo page
* fix the useFileSystemAccess updateData/updateFile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant