vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Ctrl+S in new file sometimes results in `NoPermissions` err

Open adamlui opened this issue 6 months ago • 4 comments

Type: Bug

  1. Create new tab
  2. Enter some code
  3. Ctrl+S to Save As
  4. Cancel in dialog
  5. Nav to different tab w/ different code
  6. Copy all
  7. Nav to unsaved tab
  8. Replace all w/ paste
  9. Press Ctrl+S

VS Code version: Code 1.101.0 (dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1, 2025-06-11T15:00:50.123Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2400)
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
webnn: disabled_off
Load (avg) undefined
Memory (System) 7.89GB (0.78GB free)
Process Argv --crash-reporter-id b90a84ae-89ed-45c8-9adb-9989df75643b
Screen Reader no
VM 0%
Extensions (9)
Extension Author (truncated) Version
vscode-eslint dba 3.0.10
copilot Git 1.335.0
copilot-chat Git 0.28.0
vscode-autohotkey-plus-plus mar 6.7.1
debugpy ms- 2025.8.0
python ms- 2025.6.1
vscode-pylance ms- 2025.6.1
json5-kit sav 0.5.0
errorlens use 3.26.0
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
e77a2192:31326280
pythonpulldiagcf:31325931
996jf627:31283433
pythonrdcb7:31303018
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
6518g693:31325878
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004
pylancequickfixf:31319675
d784b465:31327030

adamlui avatar Jun 14 '25 11:06 adamlui

Image

adamlui avatar Jun 14 '25 11:06 adamlui

I cannot reproduce it.

Did you try with extensions disabled code --disable-extensions?

albertosantini avatar Jun 14 '25 14:06 albertosantini

Sorry the steps were listed based on vague recollection after I decided to contribute much later on a whim so are not 100% accurate, even w/ the flag I wouldn't know how to reproduce in exact same manner again (was hoping the err msg was suffice to implement a check for if file is missing & title starts w/ 'Untitled-' then trigger Save As not Save)

adamlui avatar Jun 14 '25 15:06 adamlui

Potentially changes were discarded using context menu of VS Code or GitHub Desktop or both, or copy/replace was using same code not different (but the check would solve both cases)

adamlui avatar Jun 14 '25 15:06 adamlui

I am unable to reproduce this issue. Looks like the issue is resolved. Feel free to open another issue if this continues to occur. Consider reproducing this issue with code --disable-extensions as recommended above.

bhavyaus avatar Jun 19 '25 18:06 bhavyaus

I doubt it's resolved if no one confirmed reproducing it so not sure why you closed it

Re: repro, I don't understand why you don't just do it yourselves as paid employees instead of pressuring volunteer ontributors to sacrifice more of their unpaid time

adamlui avatar Jun 19 '25 22:06 adamlui

Why not just check for if file is missing & title starts w/ 'Untitled-' then trigger Save As not Save as mentioned, it's a good defensive coding practice even (bug which is not resolved plus future ones will be prevented)

adamlui avatar Jun 19 '25 22:06 adamlui