From 143662eae200fe53f20524c07a1413b60134daed Mon Sep 17 00:00:00 2001 From: BenyFilho <168232825+BenyFilho@users.noreply.github.com> Date: Mon, 15 Dec 2025 05:41:15 -0300 Subject: [PATCH] Fix Auth Timeout Error (#5666) * Fix Auth Timeout Error * fixing Auth Timeout Error --- src/Client.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Client.js b/src/Client.js index 39b830b..6a67629 100644 --- a/src/Client.js +++ b/src/Client.js @@ -96,8 +96,7 @@ class Client extends EventEmitter { * Private function */ async inject() { - - if(this.options.authTimeoutMs === undefined){ + if(this.options.authTimeoutMs === undefined || this.options.authTimeoutMs==0){ this.options.authTimeoutMs = 30000; } let start = Date.now(); @@ -110,8 +109,7 @@ class Client extends EventEmitter { } if(!res){ throw 'auth timeout'; - } - + } await this.setDeviceName(this.options.deviceName, this.options.browserName); const pairWithPhoneNumber = this.options.pairWithPhoneNumber; const version = await this.getWWebVersion();