Can't use vscode.workspace.fs.writeFile from extension's deactivate function
Opened this issue · 0 comments
vscodenpa commented
Type: Bug
Steps to Reproduce:
- Add the following to the helloworld-sample:
export function deactivate() {
vscode.workspace.fs.writeFile(vscode.Uri.file("d:\\test.txt"), Buffer.from("hello")).then(
() => {},
error => console.log(`${error}`)
);
}
- Debug the sample through vscode
- Run the 'Hello World' command to activate the extension
- Quit vscode to cause the deactivate function to run
- Note that the 'Canceled (FileSystemError): Canceled' is output to the debug console
VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:06:49.809Z)
OS version: Windows_NT x64 10.0.22621
Modes:
System Info
Item | Value |
---|---|
CPUs | AMD Ryzen Threadripper 1950X 16-Core Processor (32 x 3394) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
Load (avg) | undefined |
Memory (System) | 63.89GB (43.90GB free) |
Process Argv | --crash-reporter-id 22b24386-c25b-404a-a2ae-9ae86dee0ec7 |
Screen Reader | no |
VM | 0% |
Extensions (58)
Extension | Author (truncated) | Version |
---|---|---|
logcat | abh | 0.0.7 |
android-dev-ext | ade | 1.4.0 |
amazon-q-vscode | ama | 1.18.0 |
aws-toolkit-vscode | ama | 3.17.0 |
scriptnotebook | aws | 0.0.6 |
serialterminal | aws | 0.0.36 |
doxdocgen | csc | 1.4.0 |
vscode-eslint | dba | 3.0.10 |
graphviz-preview | EFa | 1.7.1 |
esp-idf-extension | esp | 1.8.0 |
vscode-commands | fab | 2.0.2 |
lex-flex-yacc-bison | fau | 0.0.3 |
vscode-github-actions | git | 0.26.3 |
pdl-language | Goo | 0.2.2 |
adb-filesystem-fork | hea | 0.0.4 |
ispc | int | 1.1.1 |
llvm-tablegen | jak | 0.0.2 |
svn-scm | joh | 2.17.0 |
cortex-debug | mar | 1.12.1 |
debug-tracker-vscode | mcu | 0.0.15 |
memory-view | mcu | 0.0.25 |
peripheral-viewer | mcu | 1.4.6 |
rtos-views | mcu | 0.0.7 |
git-graph | mhu | 1.30.0 |
csharp | ms- | 2.39.29 |
vscode-dotnet-runtime | ms- | 2.1.1 |
vscode-edge-devtools | ms- | 2.1.5 |
debugpy | ms- | 2024.8.0 |
python | ms- | 2024.10.0 |
jupyter | ms- | 2024.6.0 |
jupyter-renderers | ms- | 1.0.19 |
remote-containers | ms- | 0.375.1 |
remote-ssh | ms- | 0.112.0 |
remote-ssh-edit | ms- | 0.86.0 |
remote-wsl | ms- | 0.88.2 |
cmake-tools | ms- | 1.19.31 |
cpptools | ms- | 1.21.4 |
cpptools-extension-pack | ms- | 1.3.0 |
hexeditor | ms- | 1.10.0 |
live-server | ms- | 0.4.14 |
makefile-tools | ms- | 0.9.10 |
remote-explorer | ms- | 0.4.3 |
vscode-github-issue-notebooks | ms- | 0.0.130 |
vscode-serial-monitor | ms- | 0.12.0 |
platformio-ide | pla | 3.3.3 |
raspberry-pi-pico | ras | 0.14.0 |
shader | sle | 1.1.5 |
vscode-native-svg-preview | snd | 1.72.0 |
memento-inputs | spa | 1.0.0 |
rst-vscode | tht | 3.0.1 |
tom | 1.2.2 | |
cmake | twx | 0.0.17 |
vscode-lldb | vad | 1.10.0 |
vscodeintellicode | Vis | 1.3.1 |
vscode-java-debug | vsc | 0.58.0 |
vscode-java-pack | vsc | 0.27.0 |
debug | web | 0.27.0 |
cursor-align | yo1 | 1.1.2 |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
f3je6385:31013174
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl1:31104043
refactort:31101459
ccplti:31103428
pythonrstrctxtcf:31103194
hdi1a554:31097393
wkspc-onlycs-c:31106320