The GUI client does not propagate errors properly

Advertisement

robbin
Guest

The GUI client does not propagate errors properly

We have custom, human readable, error messages sent to users while they PUT files (based on the input they upload, e.g. if it fails validation).

WinSCP however, garbles these error messages reporting all sorts of nonsense, e.g.

* "Incoming packet was garbled on decryption"
* "Error decoding SFTP packet (0, 1, 0)"

It is evident from the logs that the real error message is there and testing with the terminal client propagates these errors just fine without any of these obscure error messages.

Is there a way we can tell our users can see the errors without getting mangled (without digging into the logs) or is it possible to patch WinSCP so thaterrors are propagated properly to the end user?

Thanks,
-Robin

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,501
Location:
Prague, Czechia

Re: The GUI client does not propagate errors properly

Please be a way more specific. "custom, human readable, error messages sent to users while they PUT files" is very vague.

How do you have that implemented? Do those errors get correctly propagated in other SFTP client? Can you attach a log file?

Reply with quote

robbin
Guest

Sure, this is how it looks like in the terminal client:

winscp> put file.csv dir/*
file.csv | 2116 KB | 1346.0 KB/s | binary | 100%
Cannot close remote file 'file.csv'.
General failure (server should provide error description).
Error code: 4
Error message from server: Input contains NULL in required field column_c.

Common reasons for the Error code 4 are:
- Renaming a file to a name of already existing file.
- Creating a directory that already exists.
- Moving a remote file to a different filesystem (HDD).
- Uploading a file to a full filesystem (HDD).
- Exceeding a user disk quota.
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort

I.e. if we encounter any errors while the file is being uploaded we refuse any more input and just fail with a relevant error.

However, WinSCP in the GUI mode just throws https://github.com/mirror/winscp/blob/master/source/core/SftpFileSystem.cpp#L1088
I.e. it just communicates to the end user that "hey, we weren't able to upload the whole file".

Both FileZilla and Cyberduck let this error through as it should.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,501
Location:
Prague, Czechia

Please attach a complete session log files both from GUI and scripting showing the error.

Reply with quote

Advertisement

You can post new topics in this forum