os-js / osjs-ftp-adapter

OS.js FTP VFS Adapter
Other
1 stars 2 forks source link

OS.js UI hanging due to poor connection to FTP Server #1

Open khoaakt opened 4 years ago

khoaakt commented 4 years ago

If I set up OS.js VFS to connect to my own personal FTP Server with poor network connection. The File Manager app become unresponsive forever and Server logs show nothing.

75186390-6330f180-577a-11ea-85f3-84c67d00f9aa

I think we should have a "timeout" argument to detect if we have trouble while connect to the FTP Server.

andersevenrud commented 4 years ago

There should be a timeout in place. However I'm using a third party library for handling the connection.

I've seen other issues with this library, so I might have to look for another option -- but I remember not having many alternatives when I made this adapter :/

andersevenrud commented 4 years ago

I can at least confirm that this is a server issue, because the application itself correctly gets out of that "locked" state if the response is appropriate.

According to the FTP library used, defaults timeouts is 10s. I thought it might have been this:

https://github.com/os-js/osjs-ftp-adapter/blob/master/index.js#L53

But it seems that option is not valid anyways. I've also checked the promise chains, and they're all good.

So I somehow have to simulate this :thinking:

khoaakt commented 4 years ago

@andersevenrud It is easy to simulate, just connect to a VPN from "somewhere" having high latency and limited bandwidth then connect to your FTP Server (recommended webhost ftp). Enjoy 👌.

andersevenrud commented 4 years ago

So your problems was consistent (or never worked at all) ?

khoaakt commented 4 years ago

So your problems was consistent (or never worked at all) ?

Not quite consistent. Because after Vietnam’s (my country) Internet Service slowing down after undersea cable rupture, that problem just happened.

I have checked ping and bandwidth from my local to FTP server: high latency, low bandwidth. That's why I came to that conclusion.

andersevenrud commented 4 years ago

Okay. I might be able to simulate something similar :)