The command exited with code 0. Output: 3278:async function autoSolveAndRequestOtp(ctx, session, attempt = 1, statusMessageId = null) { 3279- // 5 invisible tries: allows AI to get a clear captcha without bothering the user 3280- if (attempt > 5) { 3281- if (statusMessageId) ctx.telegram.deleteMessage(ctx.chat.id, statusMessageId).catch(() => { }); 3282- await fetchManualCaptcha(ctx, session); 3283- return; 3284- } 3285- 3286- const tLabel = (msg) => `[Attempt ${attempt}] ${msg} - ${session.mobile || session.eidNumber}`; 3287- try { 3288- console.time(tLabel('Total Loop')); 3289- console.time(tLabel('Captcha Fetch')); 3290- const captchaResponse = await callApi('/captcha', { method: 'GET', signal: AbortSignal.timeout(10000) }); 3291- if (!captchaResponse.ok) throw new Error('Captcha fetch failed'); 3292- const data = await captchaResponse.json(); 3293- console.timeEnd(tLabel('Captcha Fetch')); 3294- 3295- session.transactionId = data.captchaTxnId; 3296- const base64Data = data.captchaBase64; 3297- console.log(`[Attempt ${attempt}] Captcha downloaded, Txn:`, session.transactionId); 3298- 3299- console.time(tLabel('OCR Solve')); 3300- const solveRes = await callApi('/solve-captcha', { 3301- method: 'POST', 3302- body: JSON.stringify({ captchaBase64: base64Data }), 3303- signal: AbortSignal.timeout(10000) 3304- }); 3305- const solveData = await solveRes.json(); 3306- session.captchaValue = solveData.captchaValue; 3307- console.log(`[Attempt ${attempt}] OCR solved:`, session.captchaValue); 3308- console.timeEnd(tLabel('OCR Solve')); 3309- 3310- let otpResponse, otpData; 3311- 3312- if (session.serviceType === 'RETRIEVE_SMS' || (session.serviceType === 'DOWNLOAD_PDF' && !session.pdfPhase)) { 3313- const reqBody = { 3314- mobile: session.mobile, 3315- name: session.name, 3316- dob: session.dob, 3317- captchaValue: session.captchaValue, 3318- captchaTxnId: session.transactionId, 3319- option: session.serviceType === 'DOWNLOAD_PDF' ? 'EID' : 'UID' 3320- }; 3321- 3322- console.time(tLabel('Backend Request')); 3323- otpResponse = await callApi('/Retrieve-Aadhaar', { 3324- method: 'POST', 3325- body: JSON.stringify(reqBody), 3326- signal: AbortSignal.timeout(12000) 3327- }); 3328- otpData = await otpResponse.json();