- Home
- Skills
- APIs & Backend
- WhatsApp Bot Failure Lab Pro: Pre-Launch Bug Finder
WhatsApp Bot Failure Lab Pro: Pre-Launch Bug Finder
by Keane
Find the bugs that make WhatsApp Cloud API bots send double replies, answer the wrong customer, crash on images or buttons, or obey forged requests: 20 realistic checks against your local bot, with evidence and fixes.
$24
WhatsApp Bot Failure Lab Pro: Pre-Launch Bug Finder
Example session with this skill installed
Supports the official WhatsApp Cloud API only (not Baileys, whatsmeow, whatsapp-web.js or third-party gateways). Requires Node.js 22+ and a bot that runs locally with a configurable Graph API base URL. Synthetic webhooks do not reproduce Meta-side enforcement such as template approval.
- Read your context and instructions
- Compiled the whatsapp bot failure
Summary
I tested your bot (bot.py, Python, Cloud API) with WhatsApp Bot Failure Lab Pro. First I made one change with your OK: the Graph base URL now reads GRAPH_API_URL (default stays https://graph.facebook.com), so the lab could capture outgoing messages. Test secrets only; nothing reached real WhatsApp.
Result: 3 pass, 13 fail, 1 inconclusive, 3 skipped (handoff, stale and burst policies are not configured for this bot). Your fear is confirmed: re-delivered messages are answered again.
What customers would experience
| Check | Result | What it means for customers |
|---|---|---|
| Baseline | PASS | 1 reply per message, ~2.2 s |
| Verify handshake | PASS | Wrong verify token is refused |
| Meta re-delivers a message | FAIL | User got 3 replies instead of 1 |
| 3 copies at once (race) | FAIL | 3 replies instead of 1 |
| Re-delivery while still processing | FAIL | 2 replies instead of 1 |
| Status webhooks | FAIL | Handler crashes on every delivery/read receipt; Meta keeps retrying and may disable the webhook |
| Ack latency | FAIL | 2222 ms before 200 OK (limit 2000 ms); slow moments trigger re-deliveries |
| Several messages in one webhook | FAIL | Only the first customer gets an answer |
| Forged requests | FAIL | Bot replied to requests with no / wrong / tampered signature: anyone who knows the URL can make it message people |
| Buttons and list replies | FAIL | Crash: msg["text"] does not exist for interactive messages |
| Images, voice notes, stickers, location... | FAIL | Crash on all 8 non-text types |
| Graph rate limit / permanent error | FAIL | A Graph error makes the webhook crash instead of being handled |
| Failed status (131047) | FAIL | Crash; Meta re-sends it |
| Malformed payloads | FAIL | 5 of 5 dropped the connection |
| Two customers at once | INCONCLUSIVE | Routing correct; content isolation not provable (replies don't echo order codes) |
| Long text + emoji | PASS |
Root causes in bot.py
do_POSTreadsvalue["messages"][0]["text"]["body"]without checking thatmessagesexists or that the type is text (lines 68-70): crashes on statuses, media, buttons and malformed payloads, and ignores every message after the first.- No
X-Hub-Signature-256check, althoughAPP_SECRETis loaded. - Reply is generated and sent before returning 200; the 2.2 s model call makes Meta retry.
- No de-duplication by message id, so every retry is answered again (and would create another order).
Proposed fix (waiting for your OK)
- Verify the signature on the raw body, return 403 on mismatch.
- Return 200 immediately, then process in a worker thread.
- Loop over every entry / change / message; ignore statuses; reply politely to non-text types.
- Claim each
message.idatomically before processing (a set with a lock now; RedisSET NXin production). - Catch Graph errors: retry only 130429 / 5xx with backoff, never 131026.
Then I'll re-run the lab to confirm every check passes.
Connects securely to your tools. The creator never sees your data.
About this skill
Your bot works in testing. Then Meta starts retrying.
Most WhatsApp bot failures never show up when you test by hand: Meta re-delivers a webhook while your bot is still thinking, a delivery receipt crashes the handler, a customer sends a voice note, two customers write at the same second. Customers see double replies, silence, or someone else's order.
This skill plays Meta on your laptop. It sends real-shaped WhatsApp Cloud API webhooks to your locally running bot and impersonates the Graph API, so every message your bot sends is captured and checked. Your agent then explains each failure in plain words, points at the responsible code, and helps you fix it.
What it checks (20 scenarios)
Reliability
- Meta re-delivers the same message: sequentially, 3x at the same moment (race), and while the first copy is still processing
- Webhook acknowledged fast enough (slow acks trigger more retries)
- One webhook carrying several messages / users
Crashes
- Status webhooks (sent / delivered / read / failed) get no reply and no 5xx
- Malformed and unexpected payloads, then the bot still works
- Buttons, list replies, template quick replies, images, voice notes, documents, stickers, locations, contacts, reactions, unsupported types
- 4,090-character messages with emoji (4,096 limit on replies)
Security and privacy
- Forged requests: missing, wrong or tampered X-Hub-Signature-256
- Webhook verification handshake refuses a wrong verify token
- Two customers at once: no data leaks to the wrong person
Graph API errors
- Rate limit (130429), then recovery
- Permanent send errors (131026) without a retry storm
- Asynchronous failed status (131047, 24-hour window)
Conversation policies (optional)
- Handoff to a human: the bot stays quiet afterwards
- Stale replays and message bursts
Plus references/fixes.md: fix patterns for Node.js, Python and Go (idempotency with Redis SET NX / Postgres ON CONFLICT, enqueue-then-ack, signature verification, retry tables by error code, handoff state).
How it works
- Your agent reads your bot and finds the webhook route and the Graph API send path.
- It proposes the smallest change to point the Graph base URL at the local mock (applied only with your OK) and uses test secrets.
- It runs the lab and writes
wa-lab-report/report.mdandreport.json. - It explains every FAIL with evidence and offers fixes, then re-runs to confirm.
Safe by design
- Zero dependencies, Node.js 22+. No network calls except to your local bot and the lab's own loopback mock.
- Refuses non-local webhook URLs unless you pass
--allow-remotefor a test deployment you control. - Secrets are redacted from reports. All generated phone numbers are fictional 1555… numbers.
- Results are PASS / FAIL / WARN / INCONCLUSIVE / SKIP: the lab never reports a pass it could not observe.
- CI-friendly exit codes.
Free vs Pro
A free edition with 6 core checks is open source on GitHub (github.com/Keanw234412/whatsapp-bot-failure-lab). Pro adds the 14 scenarios above that catch races, forged requests, cross-customer leaks, Graph API error handling and non-text crashes, plus the fix patterns.
No support for Baileys, whatsmeow, or third-party gateways. Requires Node.js 22+ for the test harness. Mocking requires the bot to support a configurable Graph API base URL.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 12 days ago
- Software
Node.jsWhatsApp Cloud API bot that runs locally
Permissions
What's inside
Frequently Asked Questions
New in APIs & Backend
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.