tonistiigi / mega

THIS REPO IS NOT MAINTAINED. Unofficial Node.js SDK for Mega
http://tonistiigi.github.com/mega
117 stars 33 forks source link

Erro at mega() in crypto in Node.js 11.15.0 #41

Closed rzorzal closed 5 years ago

rzorzal commented 5 years ago
RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 9. Received 12
    at boundsError (internal/buffer.js:50:9)
    at Buffer.readInt32BE (internal/buffer.js:370:5)
    at Object.exports.prepareKey (/home/ricardo/Repositorios/cesta/scripts/node_modules/mega/lib/crypto/index.js:35:24)
    at new Storage (/home/ricardo/Repositorios/cesta/scripts/node_modules/mega/lib/storage.js:75:21)
    at mega (/home/ricardo/Repositorios/cesta/scripts/node_modules/mega/lib/mega.js:9:10)
    at Promise (/home/ricardo/Repositorios/cesta/scripts/utils/mega-upload.js:7:29)
    at new Promise (<anonymous>)
    at Function.execute (/home/ricardo/Repositorios/cesta/scripts/utils/mega-upload.js:6:16)
    at uploadFile (/home/ricardo/Repositorios/cesta/scripts/backup/index.js:65:39)
    at init (/home/ricardo/Repositorios/cesta/scripts/backup/index.js:105:15)
let mega = require('mega');
const storage = mega({email: "MY EMAIL" , password: 'MY PASSWORD', autoload:false}, function(err) {
});

Dont matter what account I using, this erro always appear.

Can anyone help me with this ? And also, if you have other lib to upload a file to Mega, I will be glad too

habeelmazhar commented 5 years ago

same issue

rzorzal commented 5 years ago

I changed the module to megajs, as you can see at https://www.npmjs.com/package/megajs