azure-blob-to-s3 icon indicating copy to clipboard operation
azure-blob-to-s3 copied to clipboard

ERR_OUT_OF_RANGE error while running the library

Open karthikholla opened this issue 4 years ago • 6 comments

Hello @bendrucker

internal/validators.js:93
      throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);
      ^

RangeError [ERR_OUT_OF_RANGE]: The value of "length" is out of range. It must be >= 0 && <= 2147483647. Received 2598337812
    at Function.concat (buffer.js:561:5)
    at Request.<anonymous> (/usr/lib/node_modules/azure-blob-to-s3/node_modules/request/request.js:1126:30)
    at Request.emit (events.js:314:20)
    at Request.EventEmitter.emit (domain.js:483:12)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/azure-blob-to-s3/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:420:28)
    at IncomingMessage.emit (events.js:326:22)
    at IncomingMessage.EventEmitter.emit (domain.js:483:12)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  code: 'ERR_OUT_OF_RANGE'
}

I'm getting this error while using the library I'm using the CLI way to run this.

node --version
v12.20.2

npm --version
6.14.11
/usr/bin/azure-s3 \
  --concurrency 2 \
  --logLevel debug \
  --azure-connection "DefaultEndpointsProtocol=**" \
  --azure-container ** \
  --aws-bucket ** \
  --aws-region us-west-2

karthikholla avatar Feb 12 '21 05:02 karthikholla

Please don't mention people who have sent PRs or otherwise mention spam when submitting issues.

bendrucker avatar Feb 12 '21 17:02 bendrucker

Does anything happen before this error? Other logs you can share? Does it happen right away or mid run?

The request library is deprecated. Not sure if that's coming from the Azure or AWS side. Maybe an SDK update would help.

bendrucker avatar Feb 12 '21 17:02 bendrucker

npm ls request says:

[email protected] /Users/ben/src/azure-blob-to-s3
└─┬ [email protected]
  └── [email protected]

bendrucker avatar Feb 12 '21 17:02 bendrucker

Seems like https://github.com/Azure/azure-storage-node has been long since replaced by https://github.com/Azure/azure-sdk-for-js. Updating to that might address this.

bendrucker avatar Feb 12 '21 21:02 bendrucker

Does anything happen before this error? Other logs you can share? Does it happen right away or mid run?

The request library is deprecated. Not sure if that's coming from the Azure or AWS side. Maybe an SDK update would help.

When triggered the script using CLI way, it runs for a while (say 4-5 mins) then breaks it with the above error. No other logs except I observe debug logs when enabled the option.

karthikholla avatar Feb 15 '21 04:02 karthikholla

npm ls request says:

[email protected] /Users/ben/src/azure-blob-to-s3
└─┬ [email protected]
  └── [email protected]

Yes.

[email protected] /usr/lib/node_modules/azure-blob-to-s3
└─┬ [email protected]
  └── [email protected]

karthikholla avatar Feb 15 '21 04:02 karthikholla