Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] GET /group/participants/{instance} returns 500 'Cannot convert undefined or null to object' on v2.4.0

Open
#2,739 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
api, backend

Research direction

The issue is in the group participants endpoint. Look at the route handler for GET /group/participants/{instance} in the codebase, likely in a group-related controller or service file. Examine how participant data from Baileys (version 7.0.0-rc14) is processed, especially for groups with LID-only JIDs. Check for any null/undefined checks on the participant data object before operations like Object.keys() or mapping. The fix involves handling the case where participant data might be null or undefined, possibly returning an empty list or a specific error message.

Written by the indexing model from the issue text.

Description

Description

The GET /group/participants/{instance}?groupJid={jid} endpoint returns a 500 Internal Server Error with "Cannot convert undefined or null to object" on Evolution API v2.4.0 (Baileys 7.0.0-rc14), even when:

  • The instance is connected (connectionState returns {"state": "open"})
  • The group exists and has 81 participants (verified via direct DB sync)
  • The same groupJid works with other group endpoints (metadata sync works fine)

Steps to reproduce

  1. Connect an instance (state: open)
  2. Have a WhatsApp group with participants (in our case: 81 participants, all @lid JIDs)
  3. Call GET /group/participants/{instance}[email protected]

Expected behavior

Return the list of participants with their roles.

Actual behavior

{
  "status": 500,
  "error": "Internal Server Error",
  "response": {
    "message": "Cannot convert undefined or null to object"
  }
}

Same error on GET /group/findGroupInfos/{instance}?groupJid=... and GET /group/fetchAllGroups/{instance}.

Environment

  • Evolution API version: 2.4.0
  • Baileys version: 7.0.0-rc14
  • Docker deployment
  • Instance state: open (verified)
  • Group has 81 participants, all @lid JIDs (WhatsApp LID privacy feature)

Additional context

The group participant sync works via a separate internal path (cron job), so the group data IS accessible. The on-demand REST endpoint specifically fails. This may be related to how Baileys 7.0.0-rc14 handles LID-only group metadata (no PN JIDs available for participants).

Not sure if this is a Baileys upstream issue or an Evolution API mapping problem, but the error Cannot convert undefined or null to object suggests the code is trying to process participant data that came back as null/undefined from Baileys.

Dominant language
TypeScript
Stars
9.6k
Forks
7.3k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from evolution-foundation/evolution-api

All issues in evolution-foundation/evolution-api

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.