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

Infinite spinner on file save after server rest connection with client. #8

Closed
miteshcirkle opened this issue Jul 7, 2021 · 17 comments
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists help wanted Extra attention is needed important

Comments

@miteshcirkle
Copy link

miteshcirkle commented Jul 7, 2021

feature request related to a problem
Yes you are right server drop their connection after 10 mins or so of idleness.
But this same server work perfectly with other IDE or code editor like sublime text 3.

The problem is this SFTP show spinner till you not reload vs code. If SFTP did not get any response on file save within 30 seconds then it should retry to connect.

Solution
In sublime editor if sftp not able to save file within 30 seconds then sublime try to reconnect again. I suggest to implement this same solution.

SFTP IS AWESOME!

@Natizyskunk
Copy link
Owner

Have you tried to just do a simple CTRL+S inside a file even after the error is displayed ? As I said in my last answer, it should still save and upload the file correctly on the server. Even if you have an "Error" message, it's just an bug since your server isn't able to send back a comprehensive response to the SFTP extension.

@miteshcirkle
Copy link
Author

Yes, I have tried to save file but it not save to server once it start this spinner.

Please try to implement this solution if possible.

@miteshcirkle
Copy link
Author

miteshcirkle commented Jul 8, 2021

Solution
In sublime editor if sftp not able to save file within 1 second then sublime try to reconnect again. I suggest to implement this same solution.

@Natizyskunk
Copy link
Owner

Can you update to the latest 1.13.3 version and try those things ?

  1. Try adding those parameters to your sftp.json config file :
"concurrency": 1,
"connectTimeout": 1800000
  1. FAQ - Error: Failure - Solution Two
  2. FAQ - ENFILE: file table overflow ... - Solution for MacOS harsh limit <- If you're on MacOS.
  3. FAQ - Clicking Upload Changed Files does not work

@miteshcirkle
Copy link
Author

No buddy, it does not work.
I already added this options.

[07-09 10:10:06] [info] [file-save] c:\Project\Controller.php
[07-09 10:10:06] [trace] handle upload file for c:\Project\Controller.php
[07-09 10:10:06] [debug] Outbound: Sending CHANNEL_DATA (r:0, 50)
[07-09 10:10:06] [debug] SFTP: Outbound: Buffered MKDIR
[07-09 10:10:08] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:10:08] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:10:38] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:10:38] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:11:08] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:11:09] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:11:39] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:11:40] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:12:10] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:12:10] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:12:40] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:12:41] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:13:11] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:13:11] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:13:41] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:13:41] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:14:11] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:14:12] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:14:42] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:14:43] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:15:13] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:15:13] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:15:43] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:15:44] [debug] Inbound: Received REQUEST_FAILURE
[07-09 10:16:14] [debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[07-09 10:16:15] [debug] Inbound: Received REQUEST_FAILURE

@Natizyskunk
Copy link
Owner

After some research it seems to be related to the ssh2 package that is required in the package.json. Could you open a issue on his github project?

@Natizyskunk
Copy link
Owner

In the mean time i've made a temporary fix to make it easier for you to work. Normally it should not disconnect you and if it does it should only after at least 30 mins. You can simply download the v1.13.5-beta version here and follow the manual installation.

Could you give me some feedback and tell me if it has fixed your problem ?

@miteshcirkle
Copy link
Author

Not Solved

@Natizyskunk
Copy link
Owner

@miteshcirkle,

This error has been maybe introduce with the ssh2 package update to v1.1.0.

As a test to verify that you can try this :

  1. Uninstall SFTP extension from vscode.
  2. Close vscode and go to C:/Users/<username>/.vscode/extensions.
  3. In here remove all references to the SFTP extension. Liximomo's one and Natizyskunk's one.
  4. Re-open vscode and install latest liximomo's version, not mine.
  5. Re-close vscode and navigate now to C:/Users/<username>/.vscode/extensions/liximomo.sftp-1.12.9.
  6. In here edit the package.json file to update the ssh2 package version from 0.8.5 to 1.1.0 like this
    image
    !! Don't forget to save !!
  7. Now open a terrminal inside the extension folder C:/Users/<username>/.vscode/extensions/liximomo.sftp-1.12.9 and type npm i to update all the packages.
  8. After that you can open vscode again and try to connect via the SFTP extension.
  9. Now check if you still have the error or not. This will confirm if the bug is coming from the new ssh2 update.

Please give me your feedback.

@miteshcirkle
Copy link
Author

Still same problem

@Natizyskunk
Copy link
Owner

Natizyskunk commented Jul 16, 2021

@miteshcirkle,
Ok I see, now we are moving forward. This confirms that the problem has been introduce with the new ssh2 v1.1.0 update.
As it seems that the bug is coming from the new ssh2 update, I'm gonna open an issue on @mscdex github to see if he can help me to fix this.
For now the only advise I can give you is to stay with liximomo's v0.8.5 and add this fix not get the "No such file or directory" error : Fix streams autoDestroy, Node 14 major change #1009

@javimata
Copy link

javimata commented Oct 1, 2021

this error continue? never be fixed? i need restart the extension each time? please tell me about another that work fine

@Natizyskunk
Copy link
Owner

@javimata,

no solution has been found for now.
Still searching how to resolve it.

I'll let know everybody when it's fixed.

@Natizyskunk Natizyskunk added bug Something isn't working duplicate This issue or pull request already exists Hacktoberfest labels Oct 26, 2021
@jeffglynn
Copy link

I find that changing (ie. add a space) and saving the sftp.json file restarts the connection. Fixes this issue until the next time it happens

@jeffglynn
Copy link

Would you mind telling me how I get liximomo's v0.8.5?

@Natizyskunk
Copy link
Owner

Natizyskunk commented Sep 26, 2022

Related issues : #65, #67, #150, #196

@wachalala
Copy link

Hummm i have the same issue :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists help wanted Extra attention is needed important
Projects
Status: Done
Status: Done
Development

No branches or pull requests

5 participants