Comments (9)
I linked the commit that I used to make sure I had the latest one: fb2ee75
from fluentftp.
Thanks for opening this here. What exactly is the code base you are using, as the current master has tried to address this topic?
Also I would appreciate the complete log. If you read the other issues, you will notice that the connect FEAT command response and other things that precede the actual download play an important role in how the problem develops.
Meaning to say: I need more context.
from fluentftp.
Check #1518
from fluentftp.
I'm not sure what you mean by "What exactly is the code base you are using", but I'm running .NET 8 on Windows, using a project type of Microsoft.NET.Sdk.Worker
Here are the FluentFTP logs:
[2024-03-27 16:06:27.430 -06:00] Verbose> "> AutoConnect()"
[2024-03-27 16:06:27.445 -06:00] Verbose> "> AutoDetect(CloneConnection = False, FirstOnly = True, IncludeImplicit = True, AbortOnTimeout = True, RequireEncryption = False, ProtocolPriority = [Tls11, Tls12])"
[2024-03-27 16:06:27.459 -06:00] Verbose> "Status: Auto-Detect trying encryption mode \"Auto\" with \"Tls11, Tls12\""
[2024-03-27 16:06:27.469 -06:00] Verbose> "> Connect(False)"
[2024-03-27 16:06:27.478 -06:00] Verbose> "Status: FluentFTP 49.0.2.0(.NET 5.0) AsyncFtpClient"
[2024-03-27 16:06:27.491 -06:00] Info> "Status: Connecting to IP #1= ***:21"
[2024-03-27 16:06:27.560 -06:00] Verbose> "Status: Waiting for a response"
[2024-03-27 16:06:27.598 -06:00] Verbose> "Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response: 220-You are user number 3 of 250 allowed.
Response: 220-Local time is now 18:06. Server port: 21.
Response: 220-This is a private system - No anonymous login
Response: 220-IPv6 connections are also welcome on this server."
[2024-03-27 16:06:27.606 -06:00] Info> "Response: 220 You will be disconnected after 15 minutes of inactivity. [738971.921d]"
[2024-03-27 16:06:27.619 -06:00] Info> "Status: Detected FTP server: PureFTPd"
[2024-03-27 16:06:27.628 -06:00] Info> "Command: AUTH TLS"
[2024-03-27 16:06:27.635 -06:00] Verbose> "Status: Waiting for response to: AUTH TLS"
[2024-03-27 16:06:27.681 -06:00] Info> "Response: 234 AUTH TLS OK. [45ms]"
[2024-03-27 16:06:27.737 -06:00] Verbose> "Status: GnuTLS: 0 FluentFTP.GnuTLS 1.0.29.0(Win32NT/.NET 6.0) / GnuTLS 3.8.0"
[2024-03-27 16:06:27.840 -06:00] Info> "Status: FTPS authentication successful, lib = FluentFTP.GnuTLS.GnuTlsStream, cipher suite = (TLS1.3)-(ECDHE-SECP256R1)-(RSA-PSS-RSAE-SHA256)-(AES-256-GCM) [127ms]"
[2024-03-27 16:06:27.847 -06:00] Info> "Command: USER ***"
[2024-03-27 16:06:27.856 -06:00] Verbose> "Status: Waiting for response to: USER ***"
[2024-03-27 16:06:27.933 -06:00] Info> "Response: 331 User *** OK. Password required [77ms]"
[2024-03-27 16:06:27.938 -06:00] Info> "Command: PASS ***"
[2024-03-27 16:06:27.943 -06:00] Verbose> "Status: Waiting for response to: PASS ***"
[2024-03-27 16:06:28.110 -06:00] Verbose> "Response: 230-Your bandwidth usage is restricted"
[2024-03-27 16:06:28.115 -06:00] Info> "Response: 230 OK. Current directory is / [171ms]"
[2024-03-27 16:06:28.121 -06:00] Info> "Command: PBSZ 0"
[2024-03-27 16:06:28.126 -06:00] Verbose> "Status: Waiting for response to: PBSZ 0"
[2024-03-27 16:06:28.178 -06:00] Info> "Response: 200 PBSZ=0 [52ms]"
[2024-03-27 16:06:28.182 -06:00] Info> "Command: PROT P"
[2024-03-27 16:06:28.187 -06:00] Verbose> "Status: Waiting for response to: PROT P"
[2024-03-27 16:06:28.241 -06:00] Info> "Response: 200 Data protection level set to \"private\" [54ms]"
[2024-03-27 16:06:28.246 -06:00] Info> "Command: FEAT"
[2024-03-27 16:06:28.250 -06:00] Verbose> "Status: Waiting for response to: FEAT"
[2024-03-27 16:06:28.329 -06:00] Verbose> "Response: 211-Extensions supported:
Response: UTF8
Response: EPRT
Response: IDLE
Response: MDTM
Response: SIZE
Response: MFMT
Response: REST STREAM
Response: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Response: MLSD
Response: PRET
Response: AUTH TLS
Response: PBSZ
Response: PROT
Response: TVFS
Response: ESTA
Response: PASV
Response: EPSV
Response: SPSV
Response: ESTP"
[2024-03-27 16:06:28.333 -06:00] Info> "Response: 211 End. [82ms]"
[2024-03-27 16:06:28.343 -06:00] Info> "Status: Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed"
[2024-03-27 16:06:28.348 -06:00] Info> "Command: OPTS UTF8 ON"
[2024-03-27 16:06:28.354 -06:00] Verbose> "Status: Waiting for response to: OPTS UTF8 ON"
[2024-03-27 16:06:28.409 -06:00] Info> "Response: 504 Unknown command [54ms]"
[2024-03-27 16:06:28.413 -06:00] Info> "Command: SYST"
[2024-03-27 16:06:28.418 -06:00] Verbose> "Status: Waiting for response to: SYST"
[2024-03-27 16:06:28.468 -06:00] Info> "Response: 215 UNIX Type: L8 [50ms]"
[2024-03-27 16:06:28.476 -06:00] Verbose> "Status: Active ServerHandler is: PureFTPd"
[2024-03-27 16:06:28.482 -06:00] Verbose> "Status: Listing parser set to: Machine"
[2024-03-27 16:06:28.488 -06:00] Info> "Command: PWD"
[2024-03-27 16:06:28.494 -06:00] Verbose> "Status: Waiting for response to: PWD"
[2024-03-27 16:06:28.540 -06:00] Info> "Response: 257 \"/\" is your current location [46ms]"
[2024-03-27 16:06:28.560 -06:00] Verbose> "> DownloadFile(\"C:\Users\Cody\AppData\Local\Temp\cc7516ea-cc2b-4da6-bd60-2f3751284222\file.ext\", \"/path/file.ext\", Resume, Retry, Delete, OnlyVerify)"
[2024-03-27 16:06:28.576 -06:00] Verbose> "> GetFileSize(\"/path/file.ext\", -1)"
[2024-03-27 16:06:28.587 -06:00] Info> "Command: SIZE /path/file.ext"
[2024-03-27 16:06:28.592 -06:00] Verbose> "Status: Waiting for response to: SIZE /path/file.ext"
[2024-03-27 16:06:28.639 -06:00] Info> "Response: 213 48406 [47ms]"
[2024-03-27 16:06:28.646 -06:00] Verbose> "> OpenRead(\"/path/file.ext\", Binary, 0, 48406, False)"
[2024-03-27 16:06:28.655 -06:00] Info> "Command: TYPE I"
[2024-03-27 16:06:28.660 -06:00] Verbose> "Status: Waiting for response to: TYPE I"
[2024-03-27 16:06:28.710 -06:00] Info> "Response: 200 TYPE is now 8-bit binary [50ms]"
[2024-03-27 16:06:28.717 -06:00] Verbose> "> OpenDataStreamAsync(\"RETR /path/file.ext\", 0)"
[2024-03-27 16:06:28.727 -06:00] Verbose> "> OpenPassiveDataStreamAsync(PASV, \"RETR /path/file.ext\", 0)"
[2024-03-27 16:06:28.735 -06:00] Info> "Command: PRET RETR /path/file.ext"
[2024-03-27 16:06:28.742 -06:00] Verbose> "Status: Waiting for response to: PRET RETR /path/file.ext"
[2024-03-27 16:06:28.799 -06:00] Info> "Response: 200 Ready to proceed [56ms]"
[2024-03-27 16:06:28.803 -06:00] Info> "Command: PASV"
[2024-03-27 16:06:28.809 -06:00] Verbose> "Status: Waiting for response to: PASV"
[2024-03-27 16:06:28.861 -06:00] Info> "Response: 227 Entering Passive Mode (64,136,173,119,79,247) [52ms]"
[2024-03-27 16:06:28.868 -06:00] Info> "Status: Connecting to IP #1= ***:20471"
[2024-03-27 16:06:28.916 -06:00] Info> "Command: RETR /path/file.ext"
[2024-03-27 16:06:28.921 -06:00] Verbose> "Status: Waiting for response to: RETR /path/file.ext"
[2024-03-27 16:06:28.969 -06:00] Verbose> "Response: 150-Accepted data connection"
[2024-03-27 16:06:28.974 -06:00] Info> "Response: 150 47.3 kbytes to download [52ms]"
[2024-03-27 16:06:29.045 -06:00] Info> "Status: FTPS authentication successful, lib = FluentFTP.GnuTLS.GnuTlsStream, cipher suite = (TLS1.3)-(ECDHE-PSK-SECP256R1)-(AES-256-GCM) [66ms]"
[2024-03-27 16:06:29.175 -06:00] Progress: 100.0% ETA: 00:00:00
[2024-03-27 16:06:29.260 -06:00] Verbose> "Status: Disposing(async) FtpSocketStream(data connection of AsyncFtpClient)"
[2024-03-27 16:06:29.572 -06:00] Verbose> "Status: Error encountered downloading file"
[2024-03-27 16:06:29.577 -06:00] Verbose> "Status: Waiting for response to: RETR /path/file.ext"
[2024-03-27 16:06:29.586 -06:00] Verbose> "Response: 226-File successfully transferred"
[2024-03-27 16:06:29.589 -06:00] Info> "Response: 226 0.482 seconds (measured here), 98.05 Kbytes per second [667ms]"
[2024-03-27 16:06:36.743 -06:00] [ERR] [12]
FluentFTP.Exceptions.FtpException: Error while downloading the file from the server. See InnerException for more info.
---> System.ArgumentException: GnuTlsInternalStream.Read: maxCount must be greater than zero
at FluentFTP.GnuTLS.GnuTlsInternalStream.Read(Byte[] buffer, Int32 offset, Int32 maxCount)
at System.IO.Stream.<>c.<BeginReadInternal>b__38_0(Object <p0>)
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at FluentFTP.FtpSocketStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken token)
at FluentFTP.FtpDataStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken token)
at FluentFTP.AsyncFtpClient.DownloadFileInternalAsync(String localPath, String remotePath, Stream outStream, Int64 restartPosition, IProgress`1 progress, CancellationToken token, FtpProgress metaProgress, Int64 knownFileSize, Boolean isAppend, Int64 stopPosition)
--- End of inner exception stack trace ---
at FluentFTP.AsyncFtpClient.DownloadFileInternalAsync(String localPath, String remotePath, Stream outStream, Int64 restartPosition, IProgress`1 progress, CancellationToken token, FtpProgress metaProgress, Int64 knownFileSize, Boolean isAppend, Int64 stopPosition)
at FluentFTP.AsyncFtpClient.DownloadFileToFileAsync(String localPath, String remotePath, FtpLocalExists existsMode, FtpVerify verifyOptions, IProgress`1 progress, CancellationToken token, FtpProgress metaProgress)
at FluentFTP.AsyncFtpClient.DownloadFile(String localPath, String remotePath, FtpLocalExists existsMode, FtpVerify verifyOptions, IProgress`1 progress, CancellationToken token)
from fluentftp.
Code base: Current master, sorry I used ambiguous terms.
Thanks for the log, I will study them...
First glance tells me it is still related to the progress problems I linked you to - I will need some time to check this, please stand by.
from fluentftp.
Ok, I was able to reproduce this and will commit a fix in a moment
from fluentftp.
This was automatically closed by GitHub because of the wording I used in the commit text... so I reopened.
Please test with the newest master - this should now be ok.
from fluentftp.
I can confirm that I am no longer getting this exception with e84c034 applied
from fluentftp.
Great! Thanks for your efforts.
from fluentftp.
Related Issues (20)
- Disposing a connected AsyncFtpClient throws non-fatal System.InvalidCastException in version 49.0.* HOT 42
- System.InvalidCastException exception Thrown After File Upload Completes HOT 1
- Reuse Connection? HOT 3
- Error 550 file not found HOT 1
- ACTIVE mode FTP is raising Exception of Timeout but working in FileZilla and WinSCP HOT 7
- Resume Progress Problem
- timeout exception after download and upload all bytes HOT 8
- GetListing during DownloadFile/UploadFile async error HOT 4
- The AsyncFtpClientSocks5Proxy.cs need Add code HOT 2
- Connection lost between server and client not handled. HOT 12
- MLSD Last Modified DateTime.Kind HOT 2
- FtpCommandException: Code: 553 Message: Could not create file.
- Enhancement: Extend the built-in verification of all major file transfer methods with size comparison. HOT 5
- Support handling retries on Authentication Exceptions HOT 1
- Connection process hangs when attempting AutoConnect HOT 14
- Error in DownloadDirectory with progress parameter HOT 3
- Download doesn't proceed when deployed to Azure Container HOT 16
- Process hang with GnuTLS on Linux/ARM64 HOT 9
- Upload within Parallel.ForEach() HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentftp.