@open-wa/wa-automate 4.64.2 → 4.64.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  <a href="https://discord.gg/dnpp72a"><img src="https://img.shields.io/discord/661438166758195211?color=blueviolet&label=discord&style=flat" /></a> ![WhatsApp_Web 2.2147.16](https://img.shields.io/badge/WhatsApp_Web-2.2147.16-brightgreen.svg)<img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/openwadev?label=Follow%20%40openwadev%20for%20updates&logo=twitter&style=social"/>
17
17
 
18
- <a href="https://cloud.digitalocean.com/apps/new?repo=https://github.com/open-wa/wa-automate-nodejs/tree/deploy&refcode=4b093f6ecd3a&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge">
18
+ <a href="https://cloud.digitalocean.com/apps/new?repo=https%3A%2F%2Fgithub.com%2Fopen-wa%2Fwa-automate-docker%2Ftree%2Fmaster&refcode%3D4b093f6ecd3a&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge">
19
19
  <img style="max-height:200px" src="https://raw.githubusercontent.com/open-wa/wa-automate-deploy-heroku/main/assets/do_deploy.png" alt="Deploy to DO"/>
20
20
  </a>
21
21
 
@@ -504,7 +504,17 @@ function initBrowser(sessionId, config = {}, spinner) {
504
504
  spinner === null || spinner === void 0 ? void 0 : spinner.info(`Data dir doesnt exist, creating...: ${config["userDataDir"]}`);
505
505
  fs.mkdir(config["userDataDir"], { recursive: true });
506
506
  }
507
- const browser = (config === null || config === void 0 ? void 0 : config.browserWSEndpoint) ? yield puppeteer.connect(Object.assign({}, config)) : yield puppeteer.launch(Object.assign(Object.assign({ headless: true, args }, config), { devtools: false }));
507
+ const browser = (config === null || config === void 0 ? void 0 : config.browserWSEndpoint) ? yield puppeteer.connect(Object.assign({}, config)) : yield puppeteer.launch(Object.assign(Object.assign({ headless: true, args }, config), { devtools: false })).catch(e => {
508
+ spinner === null || spinner === void 0 ? void 0 : spinner.fail('Error launching browser');
509
+ console.error(e);
510
+ if (e.message.includes("ENOENT")) {
511
+ config.executablePath = (0, puppeteer_1.executablePath)();
512
+ console.log("Falling back to chromium:", config.executablePath);
513
+ return puppeteer.launch(Object.assign(Object.assign({ headless: true, args }, config), { devtools: false }));
514
+ }
515
+ spinner === null || spinner === void 0 ? void 0 : spinner.fail(e.message);
516
+ throw e;
517
+ });
508
518
  exports.BROWSER_START_TS = Date.now();
509
519
  //devtools
510
520
  if (config === null || config === void 0 ? void 0 : config.devtools) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.64.2",
3
+ "version": "4.64.3",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",