jsftp
jsftp copied to clipboard
client.put silently hangs in node 10
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.
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
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
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 Has this been merged? I have just updated to Node 10.8.0 and I'm having the same issue.
Thanks!
@WorksOfLiam nope, and I haven't received any word from the author yet.
@sergi Please update us here. Thanks.
Nice PR
@blackshadev there seems to be an issue with your PR. Would you please take a look?
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 ?
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. :<
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
Hi
Just as a note, this is also happening with the .get
method.
Thanks, Liam Barry