0 votes
by (120 points)
edited

We've been using Rebex to transfer sFtp files and we've just had the following exception whilst transferring a file. Please can you tell me what this means?

Source :
LiquidScriptingLanguage

Exception Type :
System.InvalidOperationException

Exception Message :
Invalid decoder state.

Stack Trace :
   at wWGvS.AIchsYZ.AcUJKJ(Byte[] )
   at Rebex.Net.SshSession.AePCoRZ(Byte[]& )
   at Rebex.Net.SshSession.cDtmAOZ(cMbfbTZ , Object[] )
   at Rebex.Net.SshChannel.Receive(Byte[] buffer, Int32 offset, Int32 count)
   at wWGvS.AzRMspZ.BMJzdYZ(Byte[] , Int32 , Int32 )
   at wWGvS.APnbEo.BXQTfX(Int32 )
   at wWGvS.APnbEo.CFLiXJ(BBdsJfZ& )
   at wWGvS.APnbEo.CFLiXJ(UInt32 )
   at wWGvS.APnbEo.BdgSrC(UInt32 )
   at Rebex.Net.Sftp.CipxfYZ(AYPecc , String , Stream , Int64 , Int64 )
   at FtpClientRebex.SFtp.GetFileInternal(FtpParameters parameters, String sourcePathAndFilename, Int32 maxSizeBytes, Stream stream) in c:\BuildAgent1\work\Trunk\LiquidStudio\FtpClientRebex\SFtp.cs:line 28
   at FtpClientRebex.FtpClient.GetFile(FtpParameters parameters, String sourcePathAndFilename, Int32 maxSizeBytes) in c:\BuildAgent1\work\Trunk\LiquidStudio\FtpClientRebex\FtpClient.cs:line 49
   at FtpRuntime.FtpRuntime.CopyToLpeFileSystem(String ftpDetailsModelName, String sourceFilePath, String destinationFilePath, Nullable`1 timeOutSecondsForTransfer) in c:\BuildAgent1\work\Trunk\LiquidHtml\LiquidHtmlServerSideDfmlRuntime\FtpRuntime.cs:line 155

5 Answers

0 votes
by (148k points)
edited

This is thrown when an SSH packet decoder/decryptor enters an unusable state and should never occur under normal circumstances. Did this only happen once, or are you able to reproduce it? Also, are you simply calling a single GetFile method, or are there multiple operations on the samve Sftp object running at the same time?

0 votes
by (180 points)
edited

Had the same problem today:

Invalid decoder state.
   at gbMKS.mAgm5Z.j6i9L(Byte[] )
   at Rebex.Net.SshSession.JZ4YLZ(Byte[]& )
   at Rebex.Net.SshSession.1rsOcLZ(1VEj6UZ , Object[] )
   at Rebex.Net.SshChannel.1rsOcLZ(Boolean , 1VEj6UZ , Object[] )
   at Rebex.Net.SshChannel.Receive(Byte[] buffer, Int32 offset, Int32 count)
   at gbMKS.uuA26Z.1IsOQMZ(Byte[] , Int32 , Int32 )
   at gbMKS.PEQpz.1oSQZR(Int32 )
   at gbMKS.PEQpz.2aErfC(1dRwomZ& )
   at gbMKS.PEQpz.2aErfC(UInt32 )
   at gbMKS.PEQpz.1eDJCS(UInt32 )
   at Rebex.Net.Sftp.2bVMHOZ(udycp , String , Stream , Int64 , Int64 , 27NpLhZ )
   at Rebex.Net.Sftp.2bVMHOZ(FileMode , udycp , String , String , Int64 , Int64 , Int64 , 27NpLhZ )
   at Rebex.Net.Sftp.GetFile(String remotePath, String localPath)
   at COINImport.COINDownloader.DownloadFiles(NetworkCredential credentials, String hostname, Int32 port, IEnumerable`1 files, String destdir, String dateformat)
   at COINImport.Program.Main(String[] args)
    DateTime=2012-08-31T07:04:42.4888907Z

For now, this has only occured once. Should it happen again I will let you know.

by (148k points)
edited

Thanks for letting us know! We are currently finalizing the next release of Rebex components which should report a more meaningful error instead of the old "Invalid decoder state".

by (148k points)
edited

In the latest release - http://blog.rebex.net/news/archive/2012/11/01/version-2012-r3.aspx - a more meaningful error should be reported instead of this.

by (180 points)
edited

I am still getting the same error, even with the r3 release (3.0.4700.0).

by (58.9k points)
edited

Could you please create a verbose log as descibed here.

Make sure you assign the LogWriter property just before the call to the failing GetFile method (otherwise the log would contain also password, username, etc...) and either send the log to support@rebex.net or post it here. Thank you.

0 votes
by (180 points)
edited

We have switched to SSH.Net. It's free¤ and works fine for our purposes. Sorry. The Rebex component failed on a random basis; it was scheduled (as part of a program) to download several files (ranging from <100KB to max. ~70MB) every morning; 4 out of 7 mornings (sometimes more) it would just fail for no reason. SSH.Net, downloading the same files at the same time works flawlessley.

¤ Our Rebex license also expired and we looked for alternatives and found this one...

by (148k points)
edited

No problem, good luck and don't hesitate to reconsider Rebex SFTP in the future if you run into any issues with SSH.Net!

0 votes
by (148k points)
edited

Important notice:

If you are experiencing the same issue, please let us know about it! This isn't something that happens very often (it can be triggered by disposing an Sftp object while an operation is running, for example), which means we need a bit of your cooperation in order to determine what is going on and possibly fix a bug if there actually is one.

If possible, try creating a simple application that triggers the error and mail it to us for analysis. Once we are able to reproduce the issue, I'm sure we would be able to solve it (or fix the bug) within several days. Thanks!

+1 vote
by (73.6k points)
edited

The "Invalid decoder state" arises in case of some connection failures. From Version 2013 R3 the error should be reported as "Connection failure".

...