Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erro no getAllGroups #1188

Closed
icleitoncosta opened this issue Jun 21, 2022 · 0 comments
Closed

Erro no getAllGroups #1188

icleitoncosta opened this issue Jun 21, 2022 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@icleitoncosta
Copy link
Contributor

Description

[Description of the bug, When Issue Happens]
Quando chamo a função client.getAllGroups retorna um erro de array filter:

error: 2022-06-21T23:08:50.762Z Cannot read properties of undefined (reading 'filter') - TypeError: Cannot read properties of undefined (reading 'filter')
    at Whatsapp.<anonymous> (/media/cleiton/2A16379C163767C9/projetos/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/retriever.layer.js:252:53)
    at step (/media/cleiton/2A16379C163767C9/projetos/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/retriever.layer.js:64:23)
    at Object.next (/media/cleiton/2A16379C163767C9/projetos/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/retriever.layer.js:45:53)
    at fulfilled (/media/cleiton/2A16379C163767C9/projetos/wppconnect-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/retriever.layer.js:36:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Environment

  • WPPConnect version(s): 1.14.1
  • WA-JS version(s): 2.6.0
  • Browser: Chrome
  • OS: ubuntu 20.4
  • Node version: Node 16
  • WhatsApp version: 2.2220.8
  • MultiDevice (BETA): yes

Steps to Reproduce

Somente executo a função e da o erro

Your Code

export async function getAllGroups(req, res) {
  try {
    const response = await req.client.getAllGroups(false);

    return res.status(200).json({ status: 'success', response: response });
  } catch (e) {
    req.logger.error(e);
    res.status(500).json({ status: 'error', message: 'Error fetching groups' });
  }
}
@icleitoncosta icleitoncosta added bug Something isn't working needs triage labels Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant