Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

LargeFileUploadTask.upload throws PassThrough.

Aperta
#1,895 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
node.js, typescript
Ambito
api

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
833
Fork
240
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoftgraph/msgraph-sdk-javascript

Tutte le issue di microsoftgraph/msgraph-sdk-javascript

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.