Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#2,739 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
9.6k
Fork
7.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di evolution-foundation/evolution-api

Tutte le issue di evolution-foundation/evolution-api

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.