Error 1 When Uploading Files Using SFTP in LabVIEW 2021

Updated Dec 18, 2023

Reported In

Software

  • LabVIEW 2021
  • LabVIEW 2021 SP1

Issue Details

When using the SFTP Upload VI to upload files larger than 32 KB, the connection will close immediately and the destination file will be truncated to 32KB. When this happens error 1 is thrown by the Upload files SFTP.vi, and you will see the following error message: "Error 1 occurred at NI_Subprocess.lvlib:Raw Subprocess.lvclass:_Select.vi:450001".

The error message should look similar to the screenshot below:
 
error 1 sftp upload.png

Solution

This issue is a known bug in LabVIEW 2021, all file uploads larger than 32 kB are truncated at slightly under 32 kB. An error is returned on the client, but the truncated file persists on the server. This bug was fixed in LabVIEW 2022 Q3. If you are using LabVIEW 2021, the workaround is to set a block size of 16 kB (16 384 bytes) using a property node as shown in the image below:
 
workaround SFTP upload.png
Please note that the remote path input needs to be a file path (not just a folder path).