Natizyskunk / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
373 stars 68 forks source link

Extension host terminated unexpectedly in VS Code #326

Open freakpants opened 1 year ago

freakpants commented 1 year ago

Type: Bug

Upload a file.

Extension version: 1.16.1 VS Code version: Code 1.76.0 (92da9481c0904c6adfe372c12da3b7748d74bdcb, 2023-03-01T10:22:44.506Z) OS version: Windows_NT x64 10.0.19045 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 3600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|31.92GB (14.71GB free)| |Process Argv|--folder-uri file://wsl%24/Ubuntu/home/freakpants/fut --crash-reporter-id 05a747c9-fa79-4f89-a722-f83fae9474c7| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes516:30244333 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30681850 azure-dev_surveyone:30548225 pyindex848:30662994 nodejswelcome1cf:30587006 2e4cg342:30602488 pyind779:30671433 f6dab269:30613381 vscrpc:30673769 pythonsymbol12:30671437 pythonb192:30669360 ```
Code0x2 commented 1 year ago

I'm getting this issue too. Seems to happen when uploading a file with uploadOnSave Error: Can't find config for remote resource

Code0x2 commented 1 year ago

I was able to temporarily bypass this by adding "remoteExplorer.filesExclude": ["*"] to my config file, seems to be something bugging with the remote explorer.

freakpants commented 1 year ago

I'm getting this issue too. Seems to happen when uploading a file with uploadOnSave Error: Can't find config for remote resource

Yes, that is exactly when it happens!

Songworks commented 1 year ago

Having this issue today too, unfortunately adding the suggested configuration (see also https://github.com/Natizyskunk/vscode-sftp/issues/327) to the sftp.json didn't resolve it for me. :(

Error message on each save:

2023-03-13 13:08:26.610 [error] Error: Can't find config for remote resource remote://domain.tld:22/absolute/file/path/test.scss?remoteId=1&fsPath=/absolute/file/path/test.scss.
    at t.default.<anonymous> (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:326626)
    at Generator.next (<anonymous>)
    at ~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:324140
    at new Promise (<anonymous>)
    at n (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:323885)
    at t.default.getParent (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:326538)
    at t.default.<anonymous> (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:325040)
    at Generator.next (<anonymous>)
    at ~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:324140
    at new Promise (<anonymous>)
    at n (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:323885)
    at t.default.refresh (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:324731)
    at t.default.refresh (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:323358)
    at Object.<anonymous> (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:297222)
    at Generator.next (<anonymous>)
    at ~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:296875
    at new Promise (<anonymous>)
    at n (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:296620)
    at Object.t.refreshRemoteExplorer (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:297038)
    at Object.afterHandle (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:300509)
    at Object.<anonymous> (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:293246)
    at Generator.next (<anonymous>)
    at s (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:292100)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

If vscode detectes three such errors within five minutes, it'll crash the extension host with the message: Extension host terminated unexpectedly 3 times within the last 5 minutes.

I had a look-see what is throwing the error [1] and it seems to happen before it processes the remoteExplorer.filesExclude setting [2]?

Anybody got other ideas? I don't use the remoteExplorer so I'd be more than happy to just disable the entire thing. Not sure how to go about that though..

MiszterSoul commented 1 year ago

Having this issue today too, unfortunately adding the suggested configuration (see also #327) to the sftp.json didn't resolve it for me. :(

Error message on each save:

2023-03-13 13:08:26.610 [error] Error: Can't find config for remote resource remote://domain.tld:22/absolute/file/path/test.scss?remoteId=1&fsPath=/absolute/file/path/test.scss.
    at t.default.<anonymous> (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:326626)
    at Generator.next (<anonymous>)
    at ~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:324140
    at new Promise (<anonymous>)
    at n (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:323885)
    at t.default.getParent (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:326538)
    at t.default.<anonymous> (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:325040)
    at Generator.next (<anonymous>)
    at ~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:324140
    at new Promise (<anonymous>)
    at n (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:323885)
    at t.default.refresh (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:324731)
    at t.default.refresh (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:323358)
    at Object.<anonymous> (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:297222)
    at Generator.next (<anonymous>)
    at ~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:296875
    at new Promise (<anonymous>)
    at n (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:296620)
    at Object.t.refreshRemoteExplorer (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:297038)
    at Object.afterHandle (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:300509)
    at Object.<anonymous> (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:293246)
    at Generator.next (<anonymous>)
    at s (~/.vscode/extensions/natizyskunk.sftp-1.16.1/dist/extension.js:2:292100)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

If vscode detectes three such errors within five minutes, it'll crash the extension host with the message: Extension host terminated unexpectedly 3 times within the last 5 minutes.

I had a look-see what is throwing the error [1] and it seems to happen before it processes the remoteExplorer.filesExclude setting [2]?

Anybody got other ideas? I don't use the remoteExplorer so I'd be more than happy to just disable the entire thing. Not sure how to go about that though..

Code0x2's answer is good. I'm not using RemoteExplorer, but its fixed, upload, and upload on save is woring too. Put this in settings json: "remoteExplorer":{ "filesExclude": ["*"] }

Songworks commented 1 year ago

@MiszterSoul Thanks but I've tried that. I've tried adding it to global settings.json, the settings within a xyz.code-workspace and/or the sftp.json of a project. Also tried it on just one profile within the sftp.json.

Tried the "remoteExplorer.filesExclude": ["*"] and your suggestion. Also tried sftp.remoteExplorer within settings.json, since the actual, normal sftp-settings are prefixed with the name, but no luck either. Reloaded vscode after each change...

Anyway, in case it helps somehow:

Extension info:
Version: v1.16.1 (tried pre-release v1.16.2 too, no change concerning the issue)

System info:
Version: 1.76.1 (had the issue with 1.76.0 and update it, to see if it helps)
Commit: 5e805b79fcb6ba4c2d23712967df89a089da575b
Date: 2023-03-08T16:31:31.010Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Linux x64 5.15.0-67-generic
Sandboxed: No

Example sftp.json (anonymized, including suggested fix):

{
    "name": "project.domain.tld",
    "ignore": [".vscode", ".git", ".DS_Store", ".editorconfig", "readme.md"],
    "profiles": {
        "prod": {
            "host": "host.domain.tld",
            "username": "username",
            "password": "password",
            "protocol": "sftp",
            "port": 22,
            "remotePath": "/httpdocs/www/",
            "uploadOnSave": true
        }
    },
    "defaultProfile": "prod",
    "remoteExplorer":{
        "filesExclude": ["*"]
    }
}
MiszterSoul commented 1 year ago

@MiszterSoul Thanks but I've tried that. I've tried adding it to global settings.json, the settings within a xyz.code-workspace and/or the sftp.json of a project. Also tried it on just one profile within the sftp.json.

It worked for some hours, but today the problem is still there.

freakpants commented 1 year ago

Yeah, that fix never worked for me unfortunately.

Code0x2 commented 1 year ago

Its still working for me. I think you have to open the explorer first. On the sidebar, if you open SFTP tab and then expand the server you're connected to and verify that its empty it should work

Songworks commented 1 year ago

Its still working for me. I think you have to open the explorer first. On the sidebar, if you open SFTP tab and then expand the server you're connected to and verify that its empty it should work

Yes, that seems to work for me too now. Thank you!

So:

  1. Add into projects sftp.json (maybe settings.json works too, no idea):
    "remoteExplorer":{
        "filesExclude": ["*"]
    }
  2. Go into the "SFTP: Explorer"
  3. Expand the project folder to see if it is empty, if it is you are ready to go
  4. Now it should no longer throw errors on uploadOnSave

Note: If you undo the changes, to get the error again. You'll need to restart Vscode.

freakpants commented 1 year ago

Why would my server be empty though? I'm literally using the plugin to upload stuff there?

Edit: I get it now, it's supposed to SHOW empty because of the exclusion.

Code0x2 commented 1 year ago

Why would my server be empty though? I'm literally using the plugin to upload stuff there?

Edit: I get it now, it's supposed to SHOW empty because of the exclusion.

Yes, some weird bug with the explorer so while it is uploading you have to use another client to view the files on your server

Natizyskunk commented 1 year ago

I'm aware of this bug but sadly I can't find where it come from for now. I'll take more look at it when I've less work to do at my dayjob.

Natizyskunk commented 1 year ago

Similar issues : #327, #328, #330