orkestral / venom

Venom is a high-performance system developed with JavaScript to create a bot for WhatsApp, support for creating any interaction, such as customer service, media sending, sentence recognition based on artificial intelligence and all types of design architecture for WhatsApp.
https://orkestral.io
Apache License 2.0
6.08k stars 1.19k forks source link

Error getting Chromium browser version #2415

Closed Feeh03114 closed 6 months ago

Feeh03114 commented 1 year ago

Description

Start an application on linux with the Chromium browser installed, but it was executing the command google-chrome --version and not chrome.

Steps to Reproduce

  1. try to create a new session

Your Code

 const options = {
        headless: 'new',
        disableWelcome: true,
        browserArgs:[
                  '--user-agent',
                  '--no-sandbox', 
                  '--disable-setuid-sandbox'
        ]
 }
 create(`touch-wa-bot`, qr, status,options)
      .then((client) => start(client, companie))
      .catch(async (error) => {
        console.error('Erro Connect',error); 
      });
  }

Correction

How to fix

Em node_modules\venom-bot\dist\controllers\browser.js

if ((platform === 'darwin' || platform === 'linux')) {
    chromeVersion = await getChromeVersionBash();
}

to

if ((platform === 'darwin' || platform === 'linux') && executablePath.includes('google-chrome')) {
    chromeVersion = await getChromeVersionBash();
}
jonalan7 commented 1 year ago

At the moment, due to the Puppeteer update, I've only implemented checking the Google Chrome version! I'll be adding more checks for other browser versions soon

Feeh03114 commented 1 year ago

I put it here in case it happens to anyone else has the solution already.

orkestral commented 6 months ago

New Release: npm i venom-bot@5.1.0 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