diff --git a/whatsapp-gateway/baileys-client.js b/whatsapp-gateway/baileys-client.js index e60190d..158041a 100644 --- a/whatsapp-gateway/baileys-client.js +++ b/whatsapp-gateway/baileys-client.js @@ -57,15 +57,9 @@ async function startSession(session_key, webhook_url) { const sessionFolder = path.join(SESSIONS_DIR, session_key); const { state, saveCreds } = await useMultiFileAuthState(sessionFolder); - // Fetch the latest WhatsApp Web version to avoid 405 rejection - let version; - try { - const versionInfo = await fetchLatestBaileysVersion(); - version = versionInfo.version; - console.log(`[Baileys] Using WA version: ${version}`); - } catch (e) { - console.warn(`[Baileys] Could not fetch version, using default`); - } + // Use a hardcoded stable version to prevent parsed timestamp version errors which reject pairing + const version = [2, 3000, 1017, 0]; + console.log(`[Baileys] Using stable WA version: ${version}`); const logger = pino({ level: 'silent' });