Trying to read beyond buffer length
Opened this issue · 2 comments
yayscripting commented
Hi,
I'm getting the following error once I try to upload something via your example/upload file.
assert.js:102
throw new assert.AssertionError({
^
AssertionError: Trying to read beyond buffer length
at readUInt32 (buffer.js:649:12)
at Buffer.readUInt32BE (buffer.js:673:10)
at AES.decryptCBC (/Obfuscated/node_modules/mega/lib/crypto/index.js:78:21)
at File._setAttributes (/Obfuscated/node_modules/mega/lib/file.js:67:28)
at new File (/Obfuscated/node_modules/mega/lib/file.js:27:23)
at Storage._importFile (/Obfuscated/node_modules/mega/lib/storage.js:229:32)
at Array.forEach (native)
at Storage.reload.api.on.deleted (/Obfuscated/node_modules/mega/lib/storage.js:175:16)
at Request.API.request [as _callback] (/Obfuscated/node_modules/mega/lib/api.js:76:5)
at Request.init.self.callback (/Obfuscated/node_modules/mega/node_modules/request/request.js:121:22)
Any clue how to solve it?
yayscripting commented
In addition, all tests pass:
$ node ./node_modules/mega/test/index.js
All passed.
tonistiigi commented
From the stack trace I would think this happens on reload not on upload.
If you can debug the contents of the api call then this would probably help(this would leak your file keys!). This may also be related to the missing support for shared files and directory links. Are you using those features.