WhatsApp Bot Failure Lab Pro: Pre-Launch Bug Finder

    by Keane

    1

    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

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    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

    CheckResultWhat it means for customers
    BaselinePASS1 reply per message, ~2.2 s
    Verify handshakePASSWrong verify token is refused
    Meta re-delivers a messageFAILUser got 3 replies instead of 1
    3 copies at once (race)FAIL3 replies instead of 1
    Re-delivery while still processingFAIL2 replies instead of 1
    Status webhooksFAILHandler crashes on every delivery/read receipt; Meta keeps retrying and may disable the webhook
    Ack latencyFAIL2222 ms before 200 OK (limit 2000 ms); slow moments trigger re-deliveries
    Several messages in one webhookFAILOnly the first customer gets an answer
    Forged requestsFAILBot replied to requests with no / wrong / tampered signature: anyone who knows the URL can make it message people
    Buttons and list repliesFAILCrash: msg["text"] does not exist for interactive messages
    Images, voice notes, stickers, location...FAILCrash on all 8 non-text types
    Graph rate limit / permanent errorFAILA Graph error makes the webhook crash instead of being handled
    Failed status (131047)FAILCrash; Meta re-sends it
    Malformed payloadsFAIL5 of 5 dropped the connection
    Two customers at onceINCONCLUSIVERouting correct; content isolation not provable (replies don't echo order codes)
    Long text + emojiPASS

    Root causes in bot.py

    1. do_POST reads value["messages"][0]["text"]["body"] without checking that messages exists or that the type is text (lines 68-70): crashes on statuses, media, buttons and malformed payloads, and ignores every message after the first.
    2. No X-Hub-Signature-256 check, although APP_SECRET is loaded.
    3. Reply is generated and sent before returning 200; the 2.2 s model call makes Meta retry.
    4. 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.id atomically before processing (a set with a lock now; Redis SET NX in 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

    1. Your agent reads your bot and finds the webhook route and the Graph API send path.
    2. It proposes the smallest change to point the Graph base URL at the local mock (applied only with your OK) and uses test secrets.
    3. It runs the lab and writes wa-lab-report/report.md and report.json.
    4. 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-remote for 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Network Access
    Write Files
    Environment Variables
    Read Files
    Listed12 days ago

    What's inside

    Frequently Asked Questions

    No, as long as your bot's send paths point at the local mock and it runs with test credentials. The lab itself only talks to your local bot and its own loopback mock, and refuses non-local URLs by default.

    Any. The lab talks HTTP to your bot. references/setup.md shows how to make the Graph base URL configurable in Node.js, Python and Go.

    Not yet. This version supports the official WhatsApp Cloud API (Meta webhooks + Graph API) only.

    The lab compares reply counts, recipients, order codes and timing, not wording. When it cannot observe enough it reports INCONCLUSIVE instead of guessing.

    Yes. The config can start and stop your bot, and the exit code is non-zero when a scenario fails (add --strict to also fail on WARN/INCONCLUSIVE).

    The free version has 6 core checks. Pro adds 14 scenarios (races, forged signatures, cross-customer leaks, Graph error handling, non-text crashes, handoff, stale/burst policies) and fix patterns for Node.js, Python and Go.

    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.