Open GuilhermeHumberto opened 5 years ago
Same problem here.
When I change xhr.responseType = 'arraybuffer';
to xhr.responseType = 'blob';
in window.WAPI.downloadFile2, the console of browser return Error: MediaEncryptionError: decrypt async, missing "payload"
😞
window.WAPI.downloadFile2 = function(url, done) {
let xhr = new XMLHttpRequest();
xhr.onload = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
done(xhr.response);
} else {
console.error(xhr.statusText);
}
} else {
console.log(err);
done(false);
}
};
xhr.open("GET", url, true);
//xhr.responseType = 'arraybuffer';
xhr.responseType = 'blob';
xhr.send(null);
};
convert type to lowercase to solve...
Store.CryptoLib.decryptE2EMedia(type.toLowerCase(), xhr.response, messageObj.mediaKey, messageObj.mimetype)
@ivornei tks for this! I'm testing and apparently it's working...
Hi guys!! This morning my code began to return error in decrypting files sent by Whatsapp. Can anyone tell me what it can be?
Tks!
returning in browser console:
type AUDIO
result ArrayBuffer(4522) {}
mediakey WDvy1U2igfAJ1LPlTzjPYavmS+J7K2zAowil9KKyN7w=
mimetype audio/ogg
and error:
Error: MediaEncryptionError: encryption error: TypeError: t[e] is not a function; stack: TypeError: t[e] is not a function