jsftp icon indicating copy to clipboard operation
jsftp copied to clipboard

client.put silently hangs in node 10

Open MadaraUchiha opened this issue 6 years ago • 12 comments

Using the latest version, calling ftpClient.put('/local/path', '/remote/path', console.log) never returns. In debug mode, I also get the following warning: [DEP0016] DeprecationWarning: 'GLOBAL' is deprecated, use 'global'

When moving back to node 9, it works fine.

MadaraUchiha avatar May 27 '18 11:05 MadaraUchiha

similar for client.get(url, localFile, callback): it never retrieves any byte and at some point fails with timeout. all fine on node 9, broken on node 10.5 when using the client.get(url, callback: (err, socket)) variant, the readable event occurs just once on node 10.5, but almost permanently on node 9

john30 avatar Jun 26 '18 08:06 john30

problem with client.get verified to exist on node versions 10.1.0, 10.3.0, 10.4.0 verified to be working fine on node versions 9.4.0 and 9.11.2

john30 avatar Jun 29 '18 09:06 john30

Will be fixed in my pull request. Apparently Node 10 changed the flowMode of streams. I checked the change logs and found the following: [cf5f9867ff] - (SEMVER-MAJOR) stream: 'readable' have precedence over flowing. So that's the culprit. This is a relative bug and breaking change, even though it isn't highlighted in NodeJS changelog summery.

blackshadev avatar Jul 20 '18 06:07 blackshadev

@blackshadev Has this been merged? I have just updated to Node 10.8.0 and I'm having the same issue.

Thanks!

worksofliam avatar Aug 05 '18 19:08 worksofliam

@WorksOfLiam nope, and I haven't received any word from the author yet.

blackshadev avatar Aug 05 '18 19:08 blackshadev

@sergi Please update us here. Thanks.

worksofliam avatar Aug 05 '18 19:08 worksofliam

Nice PR

mikeqoo1 avatar Aug 20 '18 02:08 mikeqoo1

@blackshadev there seems to be an issue with your PR. Would you please take a look?

rvarbanov avatar Sep 14 '18 18:09 rvarbanov

Sorry but I am unable to look into in very soon. Maybe someone else can? The PR was really simple since the bug is pretty straight forward. @sergi can you help ?

blackshadev avatar Sep 14 '18 18:09 blackshadev

It would be great if someone can add a fix as I will have to do a production hotfix and downgrade node js to version 9. I would love it if I didn't have to do that. :<

rvarbanov avatar Sep 17 '18 00:09 rvarbanov

In case this helps someone else, I have found a nice new FTP client. I'd rather change FTP client at this point than drop back to Node 8.

It is currently being actively maintained, has 0 dependencies (jsftp has 6 dependencies), is promise-based, has type annotations, and works on Node 10.

https://github.com/patrickjuchli/basic-ftp

jazoom avatar Oct 06 '18 04:10 jazoom

Hi

Just as a note, this is also happening with the .get method.

Thanks, Liam Barry

worksofliam avatar Oct 06 '18 21:10 worksofliam