evolution-api icon indicating copy to clipboard operation
evolution-api copied to clipboard

[META] QR Code / Pairing issues — tracking umbrella

Open jpedrodouradoo-cell opened this issue 9 months ago • 87 comments

Meta-issue consolidating all open QR Code / pairing-related reports. Please do not open new QR Code issues — comment here instead.

Known symptoms

  • QR Code never appears, loading forever (/instance/connect returns {"count": 0})
  • QR Code is generated but invalid / expires immediately
  • Connects then drops: stream errored out (code 515) + Pre-key upload timeout (code 408)
  • Android devices cannot read QR while iOS can
  • Pairing code login succeeds but no message events received (401 / device_removed)
  • QR refreshes every 1 minute instead of WhatsApp's native 3 minutes
  • Endpoint /instance/qrcode returns 404 (v2.3.1)
  • Behind Cloudflare / nginx: 504 Gateway Timeout generating QR
  • Behind Coolify / Railway / Docker: QR not generated

Known working workaround (community-sourced, see #2463 for full walkthrough)

Set the following env vars and restart the container:

CACHE_REDIS_ENABLED=false
CACHE_LOCAL_ENABLED=true
DATABASE_SAVE_DATA_CHATS=false
DATABASE_SAVE_DATA_CONTACTS=false
DATABASE_SAVE_DATA_HISTORIC=false
DATABASE_SAVE_DATA_LABELS=false
CONFIG_SESSION_PHONE_VERSION=2.3000.1033773198

Root cause (per community analysis): the server chokes on CPU/RAM when Baileys generates pre-keys at the same time that the Meta history "tsunami" arrives, causing pre-key timeout → stream error 515 → device kick. Redis over Docker network adds latency; disabling history sync and switching to local cache removes the bottleneck.

Scope

This umbrella tracks the infrastructure-level QR/pairing problem. Sub-topics that deserve their own issue:

  • Chatwoot-specific QR regeneration bugs → see #2014 (Chatwoot umbrella)
  • @lid vs @jid in pairing flow → see @lid umbrella

For maintainers

All duplicate QR Code issues are being closed with state_reason: duplicate pointing here. If you want to respond per-user, use this thread as the single source of truth.


This issue was reorganized from the original report ("Não gera QR Code da Instancia") as part of the 2026-04 issue triage. The original reporter (@jpedrodouradoo-cell) and all community contributors remain credited in the comment history.

jpedrodouradoo-cell avatar Feb 20 '26 10:02 jpedrodouradoo-cell

Tinha resolvido e o problema agora voltou e realmente é falha com conexão do servidor da Meta, podem rodar no terminal de vocês: curl -4 https://graph.facebook.com, isso prova que a conexão não resolve.

Perfeitamente, eu já desvendei tudo. O problema central é entre a Hostinger > Meta. Entrei em contato com o suporte das duas empresas.

Image

Estou migrando tudo para AWS, trabalho com Marketing, toda minha estrutura foi por água abaixo. Agentes IA, Trackeamento, foi tudo pro saco.

zehdal avatar Feb 20 '26 21:02 zehdal

AWS com o mesmo problema :/

carlinhosash avatar Feb 20 '26 21:02 carlinhosash

Está oscilando, hora funciona e hora para, é algo com a rede mesmo

allanmr2 avatar Feb 20 '26 21:02 allanmr2

AWS com o mesmo problema :/

AWS us-east-1 está 100% estável.

zehdal avatar Feb 20 '26 21:02 zehdal

por MUITA sorte comecei meu setup hj, to rodando docker local, quebrei a cabeça achando que era algo na config, mas aparentemente, erro geral, só retorna count:0

luizfeer avatar Feb 20 '26 22:02 luizfeer

Essa resposta da hostinger é genérica, tem respostas iguais para outros problemas há 3 dias: https://www.reddit.com/r/Hostinger/comments/1r7d2no/hostinger_provider_geboycot_door_meta/?tl=pt-br Quando deixo só uma instância, funciona. Acho que o problema não seja exatamente isso.

allanmr2 avatar Feb 20 '26 23:02 allanmr2

Subi uma VPS no lightsail AWS no east-1 e está tudo OK, realmente é o servidor.

allanmr2 avatar Feb 21 '26 02:02 allanmr2

Subi uma VPS no lightsail AWS no east-1 e está tudo OK, realmente é o servidor.

Mas e o IP dos EUA? Não acha que tem risco de ban, se considerar que os whatsapp são do Brasil?

cleytoncoro avatar Feb 21 '26 02:02 cleytoncoro

Tbm estou com o mesmo problema vps da hostinger e vps da king ambas não geram QR code a da hostinger estavam com bots conectados deu 18:00 todos caíram

adriannfrancisco avatar Feb 21 '26 02:02 adriannfrancisco

É, terminei agora a migração, coloquei tudo na Hetzner, e deu certo. A Hostinger perdeu o faturamento de uma KVM8.

Em sex., 20 de fev. de 2026 às 23:19, Adrian Francsico < @.***> escreveu:

adriannfrancisco left a comment (EvolutionAPI/evolution-api#2437) https://github.com/EvolutionAPI/evolution-api/issues/2437#issuecomment-3937949529

Tbm estou com o mesmo problema vps da hostinger e vps da king ambas não geram QR code a da hostinger estavam com bots conectados deu 18:00 todos caíram

— Reply to this email directly, view it on GitHub https://github.com/EvolutionAPI/evolution-api/issues/2437#issuecomment-3937949529, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGGV5HPAJXPDXQRMCV472Y34M66EDAVCNFSM6AAAAACV2BCZYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSMZXHE2DSNJSHE . You are receiving this because you commented.Message ID: @.***>

FernandoBolzan avatar Feb 21 '26 06:02 FernandoBolzan

Okay obg vou tentar aqui vc roda ela no easy painel ou pura?

adriannfrancisco avatar Feb 21 '26 09:02 adriannfrancisco

Intale Tiny-Proxy na sua vps e aponte a evolution para ela, resolvido em 5 minutos.

NoronhaT avatar Feb 21 '26 11:02 NoronhaT

Subi uma VPS no lightsail AWS no east-1 e está tudo OK, realmente é o servidor.

Mas e o IP dos EUA? Não acha que tem risco de ban, se considerar que os whatsapp são do Brasil?

Não sei, nunca usei mas pelo jeito não temos opção. Tem alguém aí que já usava em outro país?

allanmr2 avatar Feb 21 '26 12:02 allanmr2

Subi uma VPS no lightsail AWS no east-1 e está tudo OK, realmente é o servidor.

Mas e o IP dos EUA? Não acha que tem risco de ban, se considerar que os whatsapp são do Brasil?

Não sei, nunca usei mas pelo jeito não temos opção. Tem alguém aí que já usava em outro país?

Hj vou criar na aws São Paulo de forma emergencial. Justamente pelo IP. É mais caro, mas nada absurdo.

cleytoncoro avatar Feb 21 '26 12:02 cleytoncoro

Aqui voltou com evoapicloud/evolution-api:v2.3.5 CONFIG_SESSION_PHONE_VERSION=2.3000.1033773198

Deu certo!

affcosta avatar Feb 21 '26 12:02 affcosta

Aqui também está fora a VPS Hostinger, copiei o container pra um servidor local, já está umas 18 horas rodando sem problema algum.

JuniorLowe avatar Feb 21 '26 13:02 JuniorLowe

alguem tem da kinghost ?

adriannfrancisco avatar Feb 21 '26 13:02 adriannfrancisco

[HELP] Issue with QR Code and Pairing Code Generation - Evolution API v2.1.1 (Contabo VPS) Description: I am unable to generate a QR Code or Pairing Code on my Evolution API v2.1.1 instance. The instance is created successfully, the database connection is stable, but any request to get a connection code (via Manager or Direct API Call) returns a 404 Not Found or 408 Timeout.

Environment: -VPS: Contabo (Germany/US) - Ubuntu 22.04. -API Version: v2.1.1 (Docker). -Deployment: Docker Compose behind a Caddy Reverse Proxy. -Network: n8n-network (Docker Bridge). -Database: PostgreSQL 15 (Docker).

Security & Firewall:

UFW Status: Active. -Open Ports: 80, 443, 2224 (TCP). -Fail2Ban: Active (Monitoring SSH and HTTP). -IPv6: Disabled via sysctls in Docker Compose to avoid routing issues. -DNS: Forced to Google (8.8.8.8) in the container.

The Problem: 1-Instance Creation: Works perfectly. fetchInstances returns the instance with status connecting.

2-QR Code (Manager): The loading icon spins indefinitely, and no image is rendered.

3-Pairing Code (API/Curl): Even when calling the internal IP (127.0.0.1:8085), the API returns: {"status":404,"error":"Not Found","response":{"message":["Cannot POST /instance/connect/pairing/INSTANCE_NAME"]}}

4-Logs: When trying to connect, the logs show: INFO [ChannelStartupService] Baileys version env: 2,3000,1015901307 WARN [WAMonitoringService] Instance "NAME" - LOGOUT / REMOVED

Steps already taken: -Reinstalled the entire stack from scratch. -Wiped evolution_instances folder and Postgres data. -Tested multiple phone number formats (with and without 9th digit, with and without +55). -Added NODE_OPTIONS=--dns-result-order=ipv4first to environment. -Adjusted Caddy headers for WebSocket support (flush_interval -1). -Verified that the /docs (Swagger) route is accessible, but the connection endpoints fail.

Question: Is there any known routing issue with Contabo's IP range or any specific v2.1.1 endpoint change that could cause a 404 on the pairing route even when the instance exists? Does it require a specific Redis configuration even for single instances to handle the connection socket?

filipenunes75 avatar Feb 21 '26 13:02 filipenunes75

Intale Tiny-Proxy na sua vps e aponte a evolution para ela, resolvido em 5 minutos.

aqui quando adiciono o proxy na instância dá erro...

uso a versão final 2.3.7...

vc está em qual versão?

Pode explicar melhor como conseguiu?

douglasogaldino avatar Feb 21 '26 13:02 douglasogaldino

É, terminei agora a migração, coloquei tudo na Hetzner, e deu certo. A Hostinger perdeu o faturamento de uma KVM8.

Em sex., 20 de fev. de 2026 às 23:19, Adrian Francsico < @.***> escreveu: …

Tem algum tutorial pra fazer essa migração pra Hetzner?

gabrielprevidi avatar Feb 21 '26 14:02 gabrielprevidi