MAC Error when SftpClient.DownloadFile(UWP)

Abierto
#1,017 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
csharp
Área
networking

Línea de trabajo

Empieza reproduciendo el caso x64 UWP con SftpClient.DownloadFile y compáralo con SftpClient.OpenRead usando los detalles proporcionados del servidor OpenSSH 7.9. Rastrea el fallo desde SftpClient.InternalDownloadFile pasando por SftpSession.GetCanonicalPath y RequestRealPath; el trabajo estará terminado cuando el error MAC esté explicado y la ruta de transferencia afectada funcione sin la excepción.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Remote Server Information
Remote SSH Server version: SSH-2.0-OpenSSH_7.9
Remote Operating System distribution name and architecture: Linux aarch64
What kind of access do you have?: Full physical and software access
Does Putty/WinSCP work?: yes

Local Machine Information
Operating System: Windows 10 21H2
.NET SDKs versions installed: 2.1.511, 2.1.801, 5.0.400

Project information
What is your target framework and architecture?: x64 UWP
Is your project multi-threaded/complex?:

Source Code
Sample Code:

Sample Code:
var sftp = new SftpClient(MyIp, MyLogin, MyPassword);
sftp.Connect();
var memStream= new MemoryStream();
sftp.DownloadFile($"/opt/myfile.json", memStream);

Exceptions and Stack Trace/Call Stack:

Renci.SshNet.Common.SshConnectionException: MAC error
   at Renci.SshNet.SubsystemSession.WaitOnHandle(WaitHandle waitHandle, Int32 millisecondsTimeout)
   at Renci.SshNet.Sftp.SftpSession.RequestRealPath(String path, Boolean nullOnError)
   at Renci.SshNet.Sftp.SftpSession.GetCanonicalPath(String path)
   at Renci.SshNet.SftpClient.InternalDownloadFile(String path, Stream output, SftpDownloadAsyncResult asyncResult, Action`1 downloadCallback)
   at Renci.SshNet.SftpClient.DownloadFile(String path, Stream output, Action`1 downloadCallback)
   at RouteLoader2022.Loader.Network.FtpRouteAnalyzer.<>c__DisplayClass0_0.<AnalyzeAsync>b__0() in E:\Repos\RouteLoader2022\RouteLoader2022\Loader\Network\FtpRouteAnalyzer.cs:line 42

File transfer related
Transfer over LAN or Internet?: LAN
File size in bytes: 29876 Bytes
Uploading or Downloading? Downloading
Does remote server have enough space to store the file? Yes
Do you have access to the file being uploaded or downloaded? Yes

Increasingsize of SftpClient.BufferSize doesn't help
When do var readStream = SftpClient.OpenRead and then readStream.Read/ReadByte/ReadAsync same MAC Error exceptions throws

Lenguaje dominante
C#
Estrellas
4.4k
Forks
993
Merge medio
9 d 21 h
PR fusionados (30 d)
1

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sshnet/SSH.NET

Todos los issues de sshnet/SSH.NET

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.