venom icon indicating copy to clipboard operation
venom copied to clipboard

I can't send photos, videos, audios

Open matheus-ma1a opened this issue 1 year ago • 4 comments

Description

[I can't send photos, videos, audios, the library is only sending text, example of the code below]

Environment

  • Venom version(s): [e.g. 2.0.27, 2.2.1]
  • Browser: [e.g. Chrome 87, Chromium 85]
  • OS: [e.g. OSX 10.13.4, Windows 10]
  • Node version: [e.g. Node 8, Node 14]

Log Output

{
  me: {
    id: {
      server: 'c.us',
      user: '553191634965',
      _serialized: '[email protected]'
    },
    displayName: null,
    verifiedName: 'Paula Paz',
    searchName: null,
    pushname: 'Paula Paz',
    notifyName: null,
    isBusiness: true,
    formattedUser: null,
    tag: '2558680787',
    eurl: 'https://pps.whatsapp.net/v/t61.24694-24/380194680_838435874730191_1934537116479553166_n.jpg?ccb=11-4&oh=01_AdRUU6zpygYeqpuyvxYK11XkwHoJQmfkABaUteEQZwpG-Q&oe=653E9935&_nc_sid=000000&_nc_cat=109',
    previewEurl: 'https://pps.whatsapp.net/v/t61.24694-24/380194680_838435874730191_1934537116479553166_n.jpg?stp=dst-jpg_s96x96&ccb=11-4&oh=01_AdQT5abta-cNGuFiyVEr-wD-8uTABli8K3EF3did2XHzjQ&oe=653E9935&_nc_sid=000000&_nc_cat=109',
    fullDirectPath: '/v/t61.24694-24/380194680_838435874730191_1934537116479553166_n.jpg?ccb=11-4&oh=01_AdRUU6zpygYeqpuyvxYK11XkwHoJQmfkABaUteEQZwpG-Q&oe=653E9935&_nc_sid=000000&_nc_cat=109',
    previewDirectPath: '/v/t61.24694-24/380194680_838435874730191_1934537116479553166_n.jpg?stp=dst-jpg_s96x96&ccb=11-4&oh=01_AdQT5abta-cNGuFiyVEr-wD-8uTABli8K3EF3did2XHzjQ&oe=653E9935&_nc_sid=000000&_nc_cat=109',
    filehash: 'GFZkT6S91VQ7s2LLtgtibxXj4FibC2uOJLPKjjeAXCk=',
    stale: false,
    eurlStale: false,
    timestamp: 1697737583759,
    hostRetryCount: 0,
    dataSource: 'server',
    description: null,
    categories: [ [Object] ],
    profileOptions: { commerceExperience: 'none', cartEnabled: true },
    email: null,
    website: [],
    businessHours: null,
    address: null,
    fbPage: {},
    igProfessional: {},
    isProfileLinked: false,
    isProfileLocked: true,
    coverPhoto: null,
    automatedType: 'unknown'
  },
  to: {
    server: 'g.us',
    user: '120363194240598042',
    _serialized: '[email protected]'
  },
  erro: true,
  text: 'Error to processFiles',
  status: 404
}

Code

  function start(client) {
  
    client.onMessage((message) => {
      if (message.body == 'Boa') {
        client
          .sendText(message.from, 'Welcome Venom 🕷')
          .then((result) => {
            console.log('Result: ', result); //return object success
          })
          .catch((erro) => {
            console.error('Error when sending: ', erro); //return object error
          });
      }
    });
  
    const canal = '[email protected]'
  
  
    client.sendVideoAsGif(
      canal,
      './20231017_151813.mp4',
      'video.gif',
      'Gif image file'
    );
  
    client.sendImage(
      canal,
      './ninjacrashlogo-1-1024x873.png',
      'image-name',
      'Caption text'
    )
  
  
    client.sendText(canal, 'texto de texto')
  
  
  }

Additional context / Screenshot

image

image

matheus-ma1a avatar Oct 19 '23 17:10 matheus-ma1a

I am having the same issue. Have you been able to figure this out?

joeenet avatar Oct 28 '23 22:10 joeenet

change this: const canal = '[email protected]

from this const canal = message.from

allanalcantara avatar Nov 14 '23 13:11 allanalcantara

Same error using sendImage version: ^5.0.21 error: erro: true, text: 'Error to processFiles', status: 404

karein avatar Dec 15 '23 17:12 karein

This worked on my local server, changing the node_modules https://github.com/orkestral/venom/issues/2482#issuecomment-1732781741, https://github.com/orkestral/venom/issues/2485#issuecomment-1736243665 but i hope they correct it because usually node_modules don't go to production

karein avatar Dec 15 '23 18:12 karein

New Release: npm i [email protected] 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

orkestral avatar Apr 03 '24 15:04 orkestral