fix: WhatsApp QR code not loading in web UI - #88
Open
hasnainzxc wants to merge 1 commit into
Open
hasnainzxc wants to merge 1 commit into
hasnainzxc wants to merge 1 commit into
Conversation
Fixes three root causes reported across issues gommzystudio#3, gommzystudio#16, gommzystudio#35, gommzystudio#67, gommzystudio#70, gommzystudio#74: 1. Client socket URL mismatch (docker/remote deploy). App.tsx hardcoded localhost:3001, so the browser connected to itself instead of the backend and never received the 'qr' event. Derive the backend URL from window.location.hostname with REACT_APP_API_URL/REACT_APP_SOCKET_URL overrides. 2. Baileys WA version drift. Unpinned makeWASocket connects with a stale WhatsApp Web protocol version, causing 'QR refs attempts ended' loops and 405 errors. Pin version [2, 3000, 1034074495] in server.ts. 3. Signal container failure killed the whole server. start:signal-api exits 1 when Docker is unavailable, so the backend (and QR) never started. Make the step non-fatal with || true. Also fixes the Recharts labelFormatter TS2322 error in ContactCard that blocked the client build entirely (issues gommzystudio#65, gommzystudio#68, gommzystudio#69).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the WhatsApp QR code never appearing in the web UI, reported across multiple issues (#3, #16, #35, #67, #70, #74, #29, #32).
Root causes fixed
Client socket URL mismatch (no QR code #3, Frontend "DISCONNECTED" - QR Code generated successfully on server but not displayed in browser. #16, QR Scanner Not showing #35) - App.tsx hardcoded localhost:3001. In Docker/remote deploys the browser connected to itself and never received the qr event. Backend URL is now derived from window.location.hostname, overridable via REACT_APP_API_URL / REACT_APP_SOCKET_URL.
Baileys WhatsApp version drift (QR code is not generating anymore for whatsapp since last 4 hours #67, hello it was using an older version i have ugraded it now it works fine with newer api #70, Follow up (WA not working) #74) - unpinned makeWASocket connects with a stale WA Web protocol version, causing 'QR refs attempts ended' loops and 405 errors. Pinned version [2, 3000, 1034074495] in src/server.ts.
Signal container failure kills the server (QR code will not load #29, Can't start web interface #32) - start:signal-api exits 1 when Docker is unavailable, so the backend (and the QR endpoint) never started. Made the step non-fatal with || true in package.json.
Also fixes the Recharts labelFormatter TS2322 error in ContactCard.tsx (referenced by #65, #68, #69) that blocked the entire client build, which also prevented QR display in Docker images.
Verification