Skip to content

Bug report: Large file downloading from SharePoint raise RangeError #1796

@tobyatgithub

Description

@tobyatgithub

Category

  • Enhancement
  • Bug
  • Question

Version

Please specify what version of the library you are using: [[email protected]]

Please specify what version(s) of SharePoint you are targeting: [SharePoint online]

Expected / Desired Behavior / Question

Download the zip file (about 4.5GB) into the specified path location.

Observed Behavior

buffer.js:224
    throw err;
    ^

RangeError: "size" argument must not be larger than 2147483647
    at Function.Buffer.allocUnsafe (buffer.js:253:3)
    at Function.Buffer.concat (buffer.js:441:23)
    at Request.<anonymous> (/usr/local/lib/node_modules/@pnp/office365-cli/node_modules/request/request.js:1133:30)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/@pnp/office365-cli/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)

Steps to Reproduce

Hi guys, first time to raise an issue here. Hope I'm doing it correctly.
I was trying to make a pipeline for downloading large zip data file from sharepoint online.
I tested with smaller zip files and I worked fine.
But when I tried on a larger 4.5 GB zip file it failed.
I searched online and it seems this error comes from the js buffer which has a limitation about 2.14GB

I'm wondering will there be a fix soon? or maybe some methods to bypass this 2GB limitation?

Thank you very much!
(related stackoverflow I found: https://stackoverflow.com/questions/44994767/javascript-read-large-files-failed)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions