Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

LargeFileUploadTask.upload throws PassThrough.

Abierto
#1,895 0 comentarios 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
30/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
node.js, typescript
Área
api

Línea de trabajo

Start with LargeFileUploadTask.upload, the FileUpload construction, and createUploadSession call shown in the report; reproduce the intermittent failure with Node 20 and the 30 one-megabyte OneDrive uploads. Done means identifying why PassThrough is surfaced and documenting or fixing prevention or handling, with the behavior verified against the supplied scenario.

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

Descripción

status:waiting-for-triage type:bug
Describe the bug

When uploading 30 1MB files to OneDrive, LargeFileUploadTask.upload occasionally (about once in 5 times) throws PassThrough.

Expected behavior

I want to know how to prevent PassThrough from being thrown. Or, I want to know how to handle PassThrough when it is caught.

How to reproduce

The src is as follows:

const uploadSession = await LargeFileUploadTask.createUploadSession(
  graphClient,
  uploadSessionUrl,
  {
    item: {
      '@microsoft.graph.conflictBehavior': 'rename',
      name: filename,
    },
  },
);

const fileUpload = new FileUpload(
  fileContent,
  filename,
  fileContent.length,
);

const uploadTask = new LargeFileUploadTask(graphClient, fileUpload, uploadSession, {
  rangeSize: 1048576,
});

try {
  const uploadResult = await uploadTask.upload();

  return uploadResult?.responseBody
    ? (uploadResult.responseBody as DriveItem)
    : null;
} catch (e) {
  this.logger.error({
    message: e.constructor?.name+' '+JSON.stringify(e),
  });
  throw e;
}
SDK Version

3.0.7

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ``` PassThrough { "_events": {}, "_readableState": { "highWaterMark": 16384, "buffer": [ { "type": "Buffer", "data": [・・・] } ], "bufferIndex": 0, "length": 8062, "pipes": [], "awaitDrainWriters": null }, "_writableState": { "highWaterMark": 16384, "length": 0, "corked": 0, "writelen": 0, "bufferedIndex": 0, "pendingcb": 0 }, "allowHalfOpen": true, "_eventsCount": 2 } ```
Configuration
  • node:20-alpine3.19
  • node.version v20.18.0
Other information

No response

Lenguaje dominante
TypeScript
Estrellas
833
Forks
240
Métricas de merge de PR
Sin PR fusionados en 30 d

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 microsoftgraph/msgraph-sdk-javascript

Todos los issues de microsoftgraph/msgraph-sdk-javascript

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.