bendrucker / azure-blob-to-s3

Batch copy files from Azure Blob Storage to Amazon S3
MIT License
47 stars 19 forks source link

ERR_OUT_OF_RANGE error while running the library #37

Open karthikholla opened 3 years ago

karthikholla commented 3 years ago

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
bendrucker commented 3 years ago

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

bendrucker commented 3 years ago

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 commented 3 years ago

npm ls request says:

azure-blob-to-s3@1.1.7 /Users/ben/src/azure-blob-to-s3
└─┬ azure-storage@2.10.3
  └── request@2.88.0
bendrucker commented 3 years ago

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.

karthikholla commented 3 years ago

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 commented 3 years ago

npm ls request says:

azure-blob-to-s3@1.1.7 /Users/ben/src/azure-blob-to-s3
└─┬ azure-storage@2.10.3
  └── request@2.88.0

Yes.

azure-blob-to-s3@1.1.7 /usr/lib/node_modules/azure-blob-to-s3
└─┬ azure-storage@2.10.3
  └── request@2.88.2