From 6053d38e4d7c178fd87918175dd5136633fad3df Mon Sep 17 00:00:00 2001 From: devlikepro Date: Sun, 10 Nov 2024 12:47:51 +0700 Subject: [PATCH] [core] Handle WEBJS 429 error fix #633 --- .../webjs/2.3000.1018072227-alpha.html | 52 +++++++++++++++++++ src/core/engines/webjs/session.webjs.core.ts | 11 ++-- 2 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 src/core/engines/webjs/2.3000.1018072227-alpha.html diff --git a/src/core/engines/webjs/2.3000.1018072227-alpha.html b/src/core/engines/webjs/2.3000.1018072227-alpha.html new file mode 100644 index 00000000..333d2c04 --- /dev/null +++ b/src/core/engines/webjs/2.3000.1018072227-alpha.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + +WhatsApp Web + +
WhatsApp
 End-to-end encrypted
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/core/engines/webjs/session.webjs.core.ts b/src/core/engines/webjs/session.webjs.core.ts index 15bb472c..613970da 100644 --- a/src/core/engines/webjs/session.webjs.core.ts +++ b/src/core/engines/webjs/session.webjs.core.ts @@ -139,8 +139,8 @@ export class WhatsappSessionWebJSCore extends WhatsappSession { protected getClientOptions(): ClientOptions { const path = this.getClassDirName(); const webVersion = - this.engineConfig?.webVersion || '2.3000.1014522270-alpha'; - // this.log.debug(`Using web version: '${webVersion}'`); + this.engineConfig?.webVersion || '2.3000.1018072227-alpha'; + this.logger.info(`Using web version: '${webVersion}'`); return { puppeteer: { headless: true, @@ -150,9 +150,10 @@ export class WhatsappSessionWebJSCore extends WhatsappSession { }, webVersion: webVersion, webVersionCache: { - type: 'none', - // path: path, - // strict: true, + // type: 'none', + type: 'local', + path: path, + strict: true, }, }; }