fernandoguse
Fernando eu consegui aqui ta.
a principio cheque a versão do seu whatsapp-web.js se está na “whatsapp-web.js”: “1.23.1-alpha.5”, dentro de package.json
se não estiver troque e rode um npm install
depois vá até wbo.ts e altere o seguinte arquivo:
const wbot: Session = new Client({
session: sessionCfg,
authStrategy: new LocalAuth({
dataPath: “sessions”,
}),
webVersionCache: {
type: ‘remote’,
remotePath: ‘https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2412.54.html’,
},
puppeteer: {
executablePath: process.env.CHROME_BIN undefined,
// @ts-ignore
browserWSEndpoint: process.env.CHROME_WS undefined,
//args: args.split(‘ ’)
args: [“–no-sandbox”, “–disable-setuid-sandbox”]
}
});
para
const wwebVersion = ‘2.2407.3’;
const wbot: Session = new Client({
session: sessionCfg,
authStrategy: new LocalAuth({clientId: ‘bd_’+whatsapp.id}),
puppeteer: {
executablePath: process.env.CHROME_BIN undefined,
// @ts-ignore
browserWSEndpoint: process.env.CHROME_WS undefined,
args: args.split(‘ ’)
},
webVersionCache: {
type: ‘remote’,
remotePath: https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html
,
},
});
depois build o backend novamente e starta ele.
o meu funcionou localmente e vou testar agora na aplicação em produção.
qualquer coisa avisa