Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception RangeError: out of range index #61

Open
gitowiec opened this issue Oct 18, 2017 · 0 comments
Open

Exception RangeError: out of range index #61

gitowiec opened this issue Oct 18, 2017 · 0 comments

Comments

@gitowiec
Copy link

I got error using decompress on AWS Lambda
here is a stack trace when trying to unzip a file, AWS Lambda runs using Node 6.10.

at RangeError (native)
at BufferSlicer.read (/var/task/src/handler.js:13590:16)
at readAndAssertNoEof (/var/task/src/handler.js:35297:11)
at ZipFile.readEntry (/var/task/src/handler.js:34927:4)
at Promise (/var/task/src/handler.js:12198:7)
at extractFile (/var/task/src/handler.js:12195:29)

Here is the source of the function where line 35297 is for this.buffer.copy

	BufferSlicer.prototype.read = function(buffer, offset, length, position, callback) {
	  var end = position + length;
	  var delta = end - this.buffer.length;
	  var written = (delta > 0) ? delta : length;
	  this.buffer.copy(buffer, offset, position, end);
	  setImmediate(function() {
	    callback(null, written);
	  });
	};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant