-
Notifications
You must be signed in to change notification settings - Fork 1
Fix: Improve QR code display in terminal when running pnpm dev
#8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Polabiel <[email protected]>
pnpm dev
🟢 Iniciando conexão com Whatsapp
🧾Seus comandos estão prontos para ser usado DEBUG [23/10/2025 09:20:08]: [1761222008450] connection.update payload
|
|
@copilot INFO [23/10/2025 09:36:58]: [1761223018365] not logged in, attempting registration...
|
Co-authored-by: Polabiel <[email protected]>
pnpm devpnpm dev
|
@copilot WhiskeySockets/Baileys#1947 WhiskeySockets/Baileys#1955 veja só o que está havendo na discussao aqui parece ser util |
Co-authored-by: Polabiel <[email protected]>
... Fixed in commit |
|
@copilot então pesquisa a respeito sobre esse erro no https://github.com/WhiskeySockets/Baileys/issues pois é a biblioteca https://github.com/WhiskeySockets/Baileys que se conecta no whatsapp web |
The QR code display issue has been fixed. However, if you're experiencing connection errors after scanning the QR code, could you please provide:
This will help me understand if there's a separate connection issue that needs to be addressed beyond the QR code display fix. |

Problem
When running
pnpm dev, the WhatsApp QR code was not being displayed in the terminal, preventing users from authenticating the bot. This made it impossible to connect the bot to WhatsApp during development.Root Cause
The issue was in
src/connection.tswhere:logger.debug()which may not be visible in all logging configurationsSolution
This PR makes minimal, surgical changes to improve QR code display visibility:
Improve QR code logging visibility
Enhanced the manual QR code generation block in the
connection.updateevent handler to:logger.debug()tologger.info()for better visibilityOptimize QR code handler positioning
Based on Baileys GitHub issues (#1947, #1955, #1941), moved the QR code handler to execute before connection state processing:
connection.updateevent listenerNote: The
printQRInTerminaloption remainsfalseas it is deprecated in the current version of Baileys library. The QR code is handled manually through theconnection.updateevent listener, which is the recommended approach.Changes
File:
src/connection.tsconnection.updateevent listener (before connection state switch)Expected Behavior
When running
pnpm dev, users will now see:Testing
Impact
References
Resolves the issue where
pnpm devnão exibe o QR code para autenticação do bot.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.