Additional logging when we can't decrypt a user's profile (#1483)
Found a number of 'Illegal buffer' errors in an Electron log submitted today. As far as I can tell, these same profiles are succeedig for me, so it's time to collect more data. FREEBIE
This commit is contained in:
parent
c420c597f9
commit
2786baf2b5
1 changed files with 20 additions and 10 deletions
|
@ -816,7 +816,12 @@
|
||||||
// fail
|
// fail
|
||||||
if (e.name === 'ProfileDecryptError') {
|
if (e.name === 'ProfileDecryptError') {
|
||||||
// probably the profile key has changed.
|
// probably the profile key has changed.
|
||||||
console.log('decryptProfile error:', e);
|
console.log(
|
||||||
|
'decryptProfile error:',
|
||||||
|
id,
|
||||||
|
profile,
|
||||||
|
error && error.stack ? error.stack : error
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
@ -831,6 +836,7 @@
|
||||||
var key = this.get('profileKey');
|
var key = this.get('profileKey');
|
||||||
if (!key) { return; }
|
if (!key) { return; }
|
||||||
|
|
||||||
|
try {
|
||||||
// decode
|
// decode
|
||||||
var data = dcodeIO.ByteBuffer.wrap(encryptedName, 'base64').toArrayBuffer();
|
var data = dcodeIO.ByteBuffer.wrap(encryptedName, 'base64').toArrayBuffer();
|
||||||
|
|
||||||
|
@ -843,6 +849,10 @@
|
||||||
// set
|
// set
|
||||||
this.set({profileName: name});
|
this.set({profileName: name});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
return Promise.reject(e);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setProfileAvatar: function(avatarPath) {
|
setProfileAvatar: function(avatarPath) {
|
||||||
if (!avatarPath) { return; }
|
if (!avatarPath) { return; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue