basic-ftp: Control Socket Timeout In Electron

Describe the bug Control Socket Times out before FTP completes. When uploading a large file, I’m getting the error { error: { ftpSocket: ‘control’, info: ‘socket timeout’ } }. I’m running this in a electron.js app. It seems to run fine in a plain node.js app. Any thoughts on why the control might timeout in an electron app, but not a command line app?

Example code If I need to can can provide an example electron app.

Console output

  Connected to ***
  < 220 ProFTPD 1.3.5 Server (FTP-Server) [::ffff:***]
  Login security: No encryption
  > USER ***
  < 331 Password required for ***
  > PASS ###
  < 230 User *** logged in
  > TYPE I
  < 200 Type set to I
  > STRU F
  < 200 Structure set to F
  Trying to find optimal transfer strategy...
  > EPSV
  < 229 Entering Extended Passive Mode (|||50575|)
  Optimal transfer strategy found.
  > STOR largefile.mp4
  < 150 Opening BINARY mode data connection for largefile.mp4
  Uploading to ***:50575 (No encryption)
  {info: "socket timeout", ftpSocket: "control"}
 { error: { ftpSocket: 'control', info: 'socket timeout' } }
 { error: { ftpSocket: 'control', info: 'socket timeout' } }

Which version of Node.js are you using? Electron: 3.0.10 Node 10.2.0

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (12 by maintainers)

Most upvoted comments

According to https://electronjs.org/releases#3.0.0, Node.js 10.2.0 is used. This version can be downloaded here https://nodejs.org/download/release/v10.2.0/ which runs the above code correctly.