Skip to content

Fixes#75

Open
AlejandroSoftwaree wants to merge 4 commits intogommzystudio:masterfrom
AlejandroSoftwaree:fixes
Open

Fixes#75
AlejandroSoftwaree wants to merge 4 commits intogommzystudio:masterfrom
AlejandroSoftwaree:fixes

Conversation

@AlejandroSoftwaree
Copy link
Copy Markdown

Problem Description

This PR addresses three critical issues that currently prevent the application from running successfully out-of-the-box:

1. WhatsApp QR Code Not Generating (405 Forbidden & Infinite Loop)
When starting the backend or CLI, WhatsApp rejects the connection and returns a 405 Forbidden error. This happens because the default browser signature (['DeviceTracker', ...]) is flagged by WhatsApp's anti-spam systems, and the hardcoded WhatsApp Web version in the Baileys library is outdated. Furthermore, the connection logic treats the 405 error as a temporary drop and attempts to reconnect immediately, causing an infinite loop that prevents the QR code from ever being generated.

2. Frontend TypeScript Build Error
When attempting to start the React frontend (npm run start:client), the build fails with a TS2322 error in src/components/ContactCard.tsx. The labelFormatter property in the Recharts <Tooltip /> component is strictly typed as (t: number), which conflicts with Recharts' internal expectation of ReactNode, breaking the frontend compilation process.

3. Unnecessary Docker Dependency for WhatsApp-only tracking
The default npm run start:server command is chained with the start:signal-api script (npx tsx src/scripts/init-signal.ts). This script requires Docker to be running to initialize the Signal API container. If a user only wants to use the WhatsApp tracking feature (which does not require Docker) and doesn't have Docker running, the entire Node.js backend fails to start and crashes.

Proposed Changes

Commit: fix(frontend): resolve TS2322 type error in Recharts Tooltip

  • Change parameter type from number to any in labelFormatter
  • This fixes the type incompatibility with Recharts' internal ReactNode type expectation, allowing the frontend to build successfully.

Commit: fix(cli): update browser signature, WhatsApp version to fix 405 error and connection loop

  • Update browser signature to mimic Windows/Chrome to bypass anti-spam
  • Implement fetchLatestBaileysVersion() to use the most recent WA Web version
  • Abort automatic reconnection if the server returns a 405 (Forbidden) status code

Commit: feat: add separate start scripts for WhatsApp and Signal

  • Updated the Manual Setup section to reflect the new backend start scripts. Clarified the options for starting the server with WhatsApp only (Terminal 1.1) versus WhatsApp + Signal which requires Docker (Terminal 1.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant