[BUG] GET /group/participants/{instance} returns 500 'Cannot convert undefined or null to object' on v2.4.0
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
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 (
connectionStatereturns{"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
- Connect an instance (state: open)
- Have a WhatsApp group with participants (in our case: 81 participants, all
@lidJIDs) - 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from evolution-foundation/evolution-api
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
evolution-foundation/evolution-api#2723 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
evolution-foundation/evolution-api#2704 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
evolution-foundation/evolution-api#2702 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
evolution-foundation/evolution-api#2700 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
evolution-foundation/evolution-api#2675 ·
Maintainers usually reply within 1 day
All issues in evolution-foundation/evolution-api
Similar issues
-
ADD openalgoOpentemplate
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
factory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
vercel/ai#21528 · 3 comments ·
Maintainers usually reply within 1 day
-
bug Needs: Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/fluentui-contrib#671 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sveltejs/acorn-typescript#150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100