@open-wa/wa-automate 4.64.2 → 4.64.4
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 +1 -1
- package/dist/controllers/browser.js +11 -1
- package/package.json +2 -2
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> <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
|
|
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.
|
|
3
|
+
"version": "4.64.4",
|
|
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",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"pidtree": "^0.6.0",
|
|
155
155
|
"pidusage": "^3.0.0",
|
|
156
156
|
"postman-2-swagger": "^0.5.0",
|
|
157
|
-
"puppeteer": "^19.
|
|
157
|
+
"puppeteer": "^19.9.0",
|
|
158
158
|
"puppeteer-extra": "^3.3.4",
|
|
159
159
|
"puppeteer-extra-plugin-block-resources": "^2.4.2",
|
|
160
160
|
"puppeteer-extra-plugin-devtools": "^2.4.4",
|