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

[Bug] Error: Cannot read properties of undefined (reading 'profilePicFind') #2709

Open
BuffyDeveloper opened this issue Apr 12, 2024 · 2 comments
Labels
bug Something isn't working needs triage Needs avaliation

Comments

@BuffyDeveloper
Copy link

Description

This issue happens when trying to call the 'getProfilePicFromServer' function. I have tried it with a user who has and who does not have a profile, both give the same error.

Environment

  • Venom version(s): 5.1.0
  • Browser: N/A
  • OS: Windows 11
  • Node version: v21.6.1

Steps to Reproduce

Call the 'getProfilePicFromServer' function

Log Output

Error [TypeError]: Cannot read properties of undefined (reading 'profilePicFind')

Your Code

const venom = require('venom-bot');

venom
  .create({
    session: 'session-name'
  })
  .then((client) => start(client))
  .catch((error) => {
    console.log(error);
  });

async function start(client) {
    var url = await client.getProfilePicFromServer('NUMBER_HERE@c.us');
    console.log(url);
}
@BuffyDeveloper BuffyDeveloper added bug Something isn't working needs triage Needs avaliation labels Apr 12, 2024
@RenanGDellacqua
Copy link

RenanGDellacqua commented Apr 15, 2024

Description

This issue happens when trying to call the 'getProfilePicFromServer' function. I have tried it with a user who has and who does not have a profile, both give the same error.

Environment

  • Venom version(s): 5.1.0
  • Browser: N/A
  • OS: Windows 11
  • Node version: v21.6.1

Steps to Reproduce

Call the 'getProfilePicFromServer' function

Log Output

Error [TypeError]: Cannot read properties of undefined (reading 'profilePicFind')

Your Code

const venom = require('venom-bot');

venom
  .create({
    session: 'session-name'
  })
  .then((client) => start(client))
  .catch((error) => {
    console.log(error);
  });

async function start(client) {
    var url = await client.getProfilePicFromServer('NUMBER_HERE@c.us');
    console.log(url);
}

Revise seu método de criação de sessão com a documentação do Venom, eu estava usando um método antigo que estava dando erro na ultima versão disponível. Após ajuste não tive mais esse erro Error [TypeError]: Cannot read properties of undefined

@orkestral
Copy link
Owner

We have support for Venom for just $15 per month, if you are interested, call our support via the link: https://web.whatsapp.com/send?phone=5561985290357

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 Needs avaliation
Projects
None yet
Development

No branches or pull requests

3 participants