-
Notifications
You must be signed in to change notification settings - Fork 89
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
Error: Timeout (data socket) when downloading to a stream #256
Comments
Do you end/finish your target stream when it's done? |
@patrickjuchli having the same issue. It was working few weeks ago, now the request times out.
|
You mean the last stream in the pipeline? No. Everything in the pipeline is a 3rd party NPM package. I just consume the result with on("data"... |
@jimmysafe, there hasn't been a new release in the last weeks or months. Do you know which last version worked on your end? |
I'm getting the same issue here with slightly larger files, around 15mb to 20mb but for me it happens during upload. |
Downloading a zip file to a stream. The stream pipeline then unzips and processes the data which takes 2-3 minutes.
What I'm seeing is a successful connection and the zip file downloads quickly. Then while the rest of the pipeline is still processing, error happens and the end of the stream seems to be corrupted.
This happens with the 3rd party FTP server I'm trying to access and also with my local FileZilla test server.
Example code
This code fails with the socket error and the stream data is corrupted. The exact same code with a local file stream works.
Console output
Which version of Node.js are you using?
20.5.1
Which version of basic-ftp are you using?
5.0.5
Additional context
The FTP server is not in my control. All I know is "Microsoft FTP Service"
My project is based on @google-cloud/functions-framework to be deployed as a cloud function.
I'm using the stream-chain package to simplify stream handling. I tried a regular node pipeline with the same result.
Additional info after further investigation
The issue seems happen when basic-ftp is used with unzipper. When I switched out unzipper for zlib (and changed to a .gz file) everything works as expected.
I'm using unzipper like this
const unzipStream = ParseOne(/^FILE.zip$/)
It's unclear whether this is a basic-ftp issue or not. All I can say is I've used unzipper successfully with ssh2-sftp-client
The text was updated successfully, but these errors were encountered: