Skip to content

[WEBJS] - Data passed to getter must include an id property (it's how we memoize) but got undefined #2271

Closed

Description

@alvaromoura-nibo

Describe the bug

A clear and concise description of what the bug is. Feel free to remove sections
that you don't feel to make the text shorter!

Version

Get the WAHA version by calling GET /api/version

{
"version":"2026.8.2",
"engine":"WEBJS",
"tier":"PLUS","browser":"/usr/bin/google-chrome",
"platform":"linux/x64",
"worker": 
{"id":null}
}

Try to update to
the latest version before
creating an issue!

Steps

To Reproduce Steps to reproduce the behavior:

Send messages

Error message

"stack\\\":\\\"Error: Data passed to getter must include an id property (it's how we memoize) but got undefined\\ns (https://static.whatsapp.net/rsrc.php/v4/ys/r/cmqMr-wgNWt.js:84:180)\\n    at #evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:391:56)\\n    at async ExecutionContext.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:277:16)\\n    at async IsolatedWorld.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:100:16)\\n    at async CdpFrame.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:362:20)\\n    at async CdpPage.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:818:20)\\n    at async WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:20)\\n    at async WebjsClientCore.sendMessage (/app/node_modules/whatsapp-web.js/src/Client.js:1831:25)\\n    at async descriptor.value (/app/dist/core/abc/session.hooks.activity.js:9:20)\\n    at i (https://static.whatsapp.net/rsrc.php/v4/ys/r/cmqMr-wgNWt.js:113:348)\\n    at l (https://static.whatsapp.net/rsrc.php/v4/ys/r/cmqMr-wgNWt.js:113:124)\\n    at <anonymous> (https://static.whatsapp.net/rsrc.php/v4iEnc4/y6/l/pt_BR-j/PYdxNcUiaNb.js:1759:3740)\\n    at t (https://static.whatsapp.net/rsrc.php/v4i1XD4/yP/l/pt_BR-j/ZAM--Mw_3_V9PEPMGlHSLBhaubygUqN5a2W48NUqg0TvyJYjPNVr1q-uhGeHkLcNl1RRivciiUOquimXTyCTiBBu8dTNnEOlotUcsbpYWarBAkOQJUKdRCG3QTfbLCHDWbK7rlfba_sZCkQCU5_KRCmkqAhRgxME01XdEN1gE3f_1bLcwOwYeYbBY18ojOOuq_cfT8cdvyDIeuG5ga0EXLmWE34inRGUWhxOjPuHg4lKqGFi3_n1J_CnFbkAB7zgD1wrYAm-gGaSVts5LDoZ1Tdwc4Lbr59rKJhnTYw0PdE891XoptaC2qIZbGxCUPe86zb2ICvGdm.js:368:3778)\\n    at a (https://static.whatsapp.net/rsrc.php/v4i1XD4/yP/l/pt_BR-j/ZAM--Mw_3_V9PEPMGlHSLBhaubygUqN5a2W48NUqg0TvyJYjPNVr1q-uhGeHkLcNl1RRivciiUOquimXTyCTiBBu8dTNnEOlotUcsbpYWarBAkOQJUKdRCG3QTfbLCHDWbK7rlfba_sZCkQCU5_KRCmkqAhRgxME01XdEN1gE3f_1bLcwOwYeYbBY18ojOOuq_cfT8cdvyDIeuG5ga0EXLmWE34inRGUWhxOjPuHg4lKqGFi3_n1J_CnFbkAB7zgD1wrYAm-gGaSVts5LDoZ1Tdwc4Lbr59rKJhnTYw0PdE891XoptaC2qIZbGxCUPe86zb2ICvGdm.js:370:864)\\n    at <anonymous> (https://static.whatsapp.net/rsrc.php/v4iEnc4/y6/l/pt_BR-j/PYdxNcUiaNb.js:2137:23544)\\n    at w (https://static.whatsapp.net/rsrc.php/v4iEnc4/y6/l/pt_BR-j/PYdxNcUiaNb.js:2143:7748)\\n    at c (https://static.whatsapp.net/rsrc.php/v4ijZT4/yL/l/pt_BR-j/BAzdJSKfXr1WGosKXP__nt8EvpQ1ZrfQI2s_ymyyOg0XqlPECW87aTMeUFNbNH_-4AbDv4TlI7owd0Dr5E4kn-fZkWDeg6OcHFLP7UI4ar7ZHqaOQiyYmSpBg.js:1845:2854)\\\"},\\\"request\\\":{\\\"path\\\":\\\"/api/sendVoice\\\",\\\"method\\\":\\\"POST\\\",\\\"body\\\":{\\\"file\\\":{\\\"mimetype\\\":\\\"audio/ogg\\\",\\\"url\\\":\\\"https://test-files.nibo.com.br/download/c0a5c767-d28c-4fca-be23-7ae40660f601\\\"},\\\"convert\\\":null,\\\"chatId\\\":\\\"222384967671826@lid\\\",\\\"reply_to\\\":null,\\\"session\\\":\\\"c4059c17-adc2-412d-bb73-8e47bf5db36b\\\"},\\\"query\\\":{}},\\\"version\\\":{\\\"version\\\":\\\"2026.8.2\\\",\\\"engine\\\":\\\"WEBJS\\\",\\\"tier\\\":\\\"PLUS\\\",\\\"browser\\\":\\\"/usr/bin/google-chrome\\\",\\\"platform\\\":\\\"linux/x64\\\",\\\"worker\\\":{\\\"id\\\":null}}}\"

patron:PRO

Activity

  1. ReyhanDiansa commented on Sep 18, 2026

    @ReyhanDiansa

    i had the same issue when use sendFile api

    "message": "Data passed to getter must include an id property (it's how we memoize) but got undefined\ns (https://static.whatsapp.net/rsrc.php/v4/ys/r/cmqMr-wgNWt.js:84:180)"

  2. Thidsm commented on Sep 18, 2026

    @Thidsm

    I was using it inside an n8n build in Docker Compose, and i am having the same issue when using the SendFile API.

    500 - "{"statusCode":500,"timestamp":"2026-09-18T12:12:40.919Z","exception":{"message":"Data passed to getter must include an id property (it's how we memoize) but got undefined\ns (https://static.whatsapp.net/rsrc.php/v4/yL/r/6-eerGMZKhM.js:84:180)

  3. burhanrashid52 commented on Sep 18, 2026

    @burhanrashid52

    The bug seems to be fixed on the web.js side: wwebjs/whatsapp-web.js#201922. @devlikepro, can we get a hotfix for this?

  4. washingtong33k commented on Sep 18, 2026

    @washingtong33k

    Help!

    patron:PLUS

  5. andrelotto commented on Sep 18, 2026

    @andrelotto

    Until the hotfix does not come I use this

    docker exec waha sed -i 's/if (botOptions) {/delete message.__x_id;\n if (botOptions) {/' /app/node_modules/whatsapp-web.js/src/util/Injected/Utils.js

  6. felipemasc commented on Sep 19, 2026

    @felipemasc

    Confirmed fix (validated on WAHA Plus 2026.8.2 / WEBJS)

    We hit the same error on sendVoice / sendFile / other media sends:

    Data passed to getter must include an id property (it's how we memoize) but got undefined
    

    Plain sendText works. Root cause matches upstream: MediaData's private __x_id is spread into the outgoing Msg and overwrites the real message id.

    Upstream fix (please bundle in a WAHA hotfix image):

    Manual workaround until hotfix (container filesystem):
    File: /app/node_modules/whatsapp-web.js/src/util/Injected/Utils.js

    1. After building the message object in sendMessage, add delete message.__x_id;
    2. Prefer spreading mediaOptions.toJSON() instead of the raw MobX mediaOptions model
    3. Important: run docker restart waha after patching — Node caches the required module; restarting only the WhatsApp session is not enough. docker compose up --force-recreate / image pull drops the patch.

    Validated after patch + container restart on Plus chrome-2026.8.2:

    API Result
    sendText 201
    sendVoice 201 (ptt)
    sendImage (URL) 201
    sendVideo 201
    sendFile 201

    Please ship a hotfix that upgrades the bundled whatsapp-web.js with PR #201923 so PLUS users do not need a manual container patch.

  7. ijulalam commented on Sep 20, 2026

    @ijulalam

    I use sent image also not working
    Pls help

  8. felipemasc commented on Sep 21, 2026

    @felipemasc

    WAHA — temporary fix for media send (WEBJS)

    Applies a hotfix for HTTP 500 on sendVoice / sendFile / images / documents:

    Data passed to getter must include an id property (it's how we memoize) but got undefined

    Requirements
    Docker running
    WAHA container up (default name: waha)
    Files from update-001.tar.gz
    Steps

    1) Copy the archive to the server, then extract

    tar -xzvf update-001.tar.gz
    cd update-001
    chmod +x apply.sh verify.sh revert.sh

    2) Apply the fix (patches + restarts the container + verifies)

    ./apply.sh
    If the container has another name:

    WAHA_CONTAINER=your-container-name ./apply.sh
    After apply
    Wait until WhatsApp sessions are WORKING again.
    Test sendVoice or sendFile — expected HTTP 201.
    Optional checks:

    ./verify.sh # confirm patch is on disk
    ./revert.sh # undo if needed
    Important
    This is a temporary container patch (not an official WAHA image).
    It is lost after docker compose pull, --force-recreate, or recreating the container — run ./apply.sh again.
    Plain docker restart keeps the patch.
    Remove this workaround when WAHA ships an official image with the whatsapp-web.js fix.
    References
    Issue: #2271
    Upstream PRs: #201923 and #201924

    update-001.tar.gz

  9. added a commit that references this issue on Sep 22, 2026
    8204670
  10. devlikepro commented on Sep 22, 2026

    @devlikepro
    Contributor

    2026.9.1 - WEBJS - Fix sending media - Data passed to getter must include an id property - #2271, #2273

    patron:PRO

  11. locked as resolved and limited conversation to collaborators on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions