Alteração na instacia do chrome
parent
aa36aedd43
commit
0576614473
|
@ -70,10 +70,24 @@ export const initWbot = async (whatsapp: Whatsapp, backupSessionRestore: boolean
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// usando instancia do chrome
|
// usando instancia do chrome
|
||||||
|
// const wbot: Session = new Client({
|
||||||
|
// session: sessionCfg, authStrategy: new LocalAuth({ clientId: 'bd_' + whatsapp.id }),
|
||||||
|
// // puppeteer: { args: ['--no-sandbox', '--disable-setuid-sandbox'], executablePath: process.env.CHROME_BIN || undefined },
|
||||||
|
// puppeteer: { args: ['--no-sandbox', '--disable-setuid-sandbox'], executablePath: process.env.CHROME_BIN || '/usr/bin/google-chrome-stable' },
|
||||||
|
|
||||||
|
// });
|
||||||
|
|
||||||
|
const args:String = process.env.CHROME_ARGS || "";
|
||||||
|
|
||||||
const wbot: Session = new Client({
|
const wbot: Session = new Client({
|
||||||
session: sessionCfg, authStrategy: new LocalAuth({ clientId: 'bd_' + whatsapp.id }),
|
session: sessionCfg,
|
||||||
// puppeteer: { args: ['--no-sandbox', '--disable-setuid-sandbox'], executablePath: process.env.CHROME_BIN || undefined },
|
authStrategy: new LocalAuth({ clientId: 'bd_' + whatsapp.id }),
|
||||||
puppeteer: { args: ['--no-sandbox', '--disable-setuid-sandbox'], executablePath: process.env.CHROME_BIN || '/usr/bin/google-chrome-stable' },
|
puppeteer: {
|
||||||
|
executablePath: process.env.CHROME_BIN || undefined,
|
||||||
|
// @ts-ignore
|
||||||
|
browserWSEndpoint: process.env.CHROME_WS || undefined,
|
||||||
|
args: args.split(' ')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue