waha icon indicating copy to clipboard operation
waha copied to clipboard

[WEBJS] - CreateGroupError when calling POST /api/{session}/groups after upgrade version

Open Interspock opened this issue 1 year ago • 3 comments

Describe the bug

When attempting to create a new WhatsApp group via the WAHA HTTP API, the call returns a generic CreateGroupError: An unknown error occupied while creating a group, and no gid is returned. Even after calling the /groups/refresh endpoint, the error persists.

Version

Get the WAHA version by calling GET /api/version

{
  "version": "2025.7.7",
  "engine": "WEBJS",
  "tier": "PLUS",
  "browser": "/usr/bin/chromium"
}

Steps

To Reproduce Steps to reproduce the behavior:

With the session in WORKING state: Refresh groups

curl -s -X POST "http://localhost:3000/api/XXXX/groups/refresh" \ -H "X-Api-Key: $API_KEY"

Then

curl -v -X POST "http://localhost:3000/api/XXXX/groups" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: $API_KEY" \
  -d '{
        "name": "prueba",
        "participants": [
          { "id": "[email protected]" }
        ]
      }'

Returns:


{
  "error": "CreateGroupError: An unknown error occupied while creating a group"
}

Server logs:

2025-07-22T14:53:57.028Z ERROR CreateGroupError: An unknown error occupied while creating a group
Error: Lid origin type is missing in chat table
    at #evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:391:56)
    at async ExecutionContext.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:277:16)
    at async IsolatedWorld.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:100:16)
    at async CdpFrame.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:364:20)
    at async WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:20)
    at async WebjsClientPlus.createGroup (/app/node_modules/whatsapp-web.js/src/Client.js:1562:16)
    at async GroupsController.createGroup (…/src/controllers/GroupsController.js:42:10)
    … (stack trimmed for brevity)

Expected behavior

HTTP 201 Created

{
  "gid": {
    "_serialized": "<[email protected]>"
  },
}

Additional Notes Calling /groups/refresh immediately before did return HTTP 200, but did not resolve the create-group error.

Please let me know if you need any further details or reproduce logs!

Image

Interspock avatar Jul 23 '25 03:07 Interspock

Let's see how many patron:PLUS and patron:PRO supporters needs the fix and prioritize it based on that.

👍 Comment with "+1" if you experience it!

devlikepro avatar Jul 23 '25 07:07 devlikepro

Any Update on this.

systemkunal-pixel avatar Aug 05 '25 06:08 systemkunal-pixel

🛠️ Fixes

  • 2025.8.1 - WEBJS - fix create group - #1145

patron:PRO

devlikepro avatar Aug 05 '25 09:08 devlikepro