fix: Signature decrpytion failure caused by mobile user agents #55

This commit is contained in:
Jelle Glebbeek
2021-05-18 22:53:50 +02:00
parent e973310226
commit a185d73f13
2 changed files with 6 additions and 3 deletions

View File

@@ -139,10 +139,12 @@ class ErrorHandler {
} }
if(!foundError) { if(!foundError) {
if(stderr.includes("ERROR")) { if(stderr.includes("ERROR")) {
foundError = true;
console.error(stderr) console.error(stderr)
this.raiseUnhandledError(stderr, identifier); this.raiseUnhandledError(stderr, identifier);
} }
} }
return foundError;
} }
raiseUnhandledError(error, identifier) { raiseUnhandledError(error, identifier) {

View File

@@ -17,7 +17,7 @@ class Query {
if(this.environment.settings.spoofUserAgent) { if(this.environment.settings.spoofUserAgent) {
args.push("--user-agent"); //Add random user agent to slow down user agent profiling args.push("--user-agent"); //Add random user agent to slow down user agent profiling
args.push(new UserAgent().toString()); args.push(new UserAgent({ deviceCategory: 'desktop' }).toString());
} }
if(!this.environment.settings.validateCertificate) { if(!this.environment.settings.validateCertificate) {
@@ -42,8 +42,9 @@ class Query {
const {stdout} = await execa(command, args); const {stdout} = await execa(command, args);
return stdout return stdout
} catch(e) { } catch(e) {
console.error(e.stderr); if(!this.environment.errorHandler.checkError(e.stderr, this.identifier)) {
this.environment.errorHandler.raiseUnhandledError("Please report this error.\n" + e.stderr, this.identifier); this.environment.errorHandler.raiseUnhandledError("Please report this error.\n" + e.stderr, this.identifier);
}
return "{}"; return "{}";
} }
} else { } else {