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

I have this issue where its perpetually loading but the drives are already mounted? #148

Open
arty01238 opened this issue May 2, 2022 · 9 comments
Labels
help wanted Extra attention is needed

Comments

@arty01238
Copy link

image

@Turtle-Boi
Copy link

Same here

@evsar3
Copy link
Owner

evsar3 commented Jul 14, 2022

Hello,

Try this:
#9 (comment)

@evsar3 evsar3 added the help wanted Extra attention is needed label Jul 14, 2022
@ghost
Copy link

ghost commented Jul 18, 2022

I have the same issue. I tried editing %AppData%\sshfs-win-manager\vuex.json as suggested, but that did not change antyhing for me.

When I look in the vuex.json file it stands out that the the one drive that is marked as "mounted" has a non-null pid key (and the status: connected), while all the loading items have pid: null and status: connecting.
All connections are actually mounted and in the task manager I can see multiple sshfs.exe processes with distinct PID's and the correct command line.

@BOZG
Copy link

BOZG commented Jul 29, 2022

I also started having this issue recently on an updated Windows 11 install. Some observations in case they help with troubleshooting the problem:

When the issue emerged, the one connection that worked correctly was the one connection that always worked correctly. Restarting SSHFS or rebooting the machine did not at any point lead to any other connection working correctly. In case it's relevant, it's the first connection on my list.

Disabling auto-connection on the "working" connection and restarting SSHFS led to one of the non-working connections taking over as the working connection. This then became the one connection that worked every single time. In case it's relevant, it is the third connection on my list.

Re-enabling auto-connection on the first connection (the one that worked initially) led to it once again becoming the only working connection.

Turning off auto-connection on all connections and connecting manually leads to things working correctly.

Turning off auto-connection on all but one of the connections and connecting the others manually also works without issues.

@BOZG
Copy link

BOZG commented Jul 30, 2022

Not sure if it's definitely related but I've noticed just now that trying to manually start multiple connections quickly leads to the same issue. The first connection works fine but subsequent connections keep spinning. When auto-connect is enabled, does SSHFS try to mount all connection simultaneously? Could the issue be resolved by forcing a short delay before each connection is mounted? Waiting 1-2 seconds seems to be enough for me.

@evsar3
Copy link
Owner

evsar3 commented Jul 30, 2022

I'm thinking in disable the 'connect' button for all other connection profiles while there is a connection pending. This should allow to connect one connection at a time.

@ShayBox
Copy link

ShayBox commented Sep 3, 2022

If it's a race causing the issue there should be a lock when a connection starts until it's finished, such as a simple boolean

@TTSKarlsson
Copy link

TTSKarlsson commented Oct 1, 2022

I want to provide one possible solution to getting the pids that this app needs, this is not a solution for users but only for the repo owner:

PS C:\> get-process | Where-Object { $_.ProcessName -eq "sshfs" } | ForEach-Object { Write-Output "`n$($_.Id) $($_.CommandLine)" }

2092 "C:\Program Files\SSHFS-Win\bin\sshfs.exe" username@firsthost:/home/username/dev/app/sites W: -p22 ...

6436 "C:\Program Files\SSHFS-Win\bin\sshfs.exe" username@secondhost:/home/username/knowledge Y: -p22 ...

8072 "C:\Program Files\SSHFS-Win\bin\sshfs.exe" username@secondhost:/home/username X: -p22 ...

17100 "C:\Program Files\SSHFS-Win\bin\sshfs.exe" username@firsthost:/home/username/work V: -p22 ...

That powershell command will get all the sshfs processes and write out their process id and launch cmd, which can easily be parsed to see which process id belongs to which connection. If one connection is not shown on this it is disconnected, if it is shown it is connected. The command line is quite long and contains a lot of info that I cut out that could be useful too.

@TheKingEagle
Copy link

TheKingEagle commented Dec 31, 2022

I've been looking at this for a bit, I took out a line, which seems to fix the issue. However, I am not sure if that negatively affects things elsewhere. As others noted, the problem occurs if multiple drives are mounted with the option "mount on startup" selected.

/src/MainWindow/index.vue connect(conn): line ~103 ish

// ...
const connect = c => {
        ProcessManager.create(c).then(pid => {
          conn.pid = pid
          conn.status = 'connected'
          // this.updateConnectionList() // Removing this line appears to fix the issue?
        }).catch(error => {
          conn.status = 'disconnected'

          this.updateConnectionList()

          this.notify(`Can't connect to '${conn.name}': ${error}`, 'error-icon')
        })
// ...

Edit: This introduces a trouble condition. If one drive fails to mount, the others will perpetually load.

TheKingEagle added a commit to TheKingEagle/sshfs-win-manager that referenced this issue Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants