Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix(workers): prevent crash caused by puppeteer-extra

Mohamed Bassemd197f595250d
diff --git a/package.json b/package.json
index fef15bac..c01ebc16 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,8 @@
"packageManager": "[email protected]",
"pnpm": {
"patchedDependencies": {
}
}
}
diff --git a/patches/[email protected] b/patches/[email protected]
new file mode 100644
index 00000000..724e08e5
--- /dev/null
+++ b/patches/[email protected]
@@ -0,0 +1,21 @@
+diff --git a/dist/puppeteer-compatiblity-shim/index.js b/dist/puppeteer-compatiblity-shim/index.js
+index fd1297952369011b711a83124209f1cd3789978e..71eba6bf608da93f6e2adf0faf648bb7cd75d2fa 100644
+--- a/dist/puppeteer-compatiblity-shim/index.js
++++ b/dist/puppeteer-compatiblity-shim/index.js
+@@ -116,8 +116,14 @@ function createPageShim(page) {
+ if (prop === '_client') {
+ return () => ({
+ send: async (method, params) => {
+- const session = await getPageCDPSession(page);
+- return await session.send(method, params);
++ try {
++ const session = await getPageCDPSession(page);
++ return await session.send(method, params);
++ }
++ catch (err) {
++ debug('page shim: error when sending:', err.message);
++ return Promise.resolve();
++ }
+ },
+ on: (event, listener) => {
+ getPageCDPSession(page).then(session => {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0f9ecb8c..7a3804ed 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5,6 +5,9 @@ settings:
excludeLinksFromLockfile: false
patchedDependencies:
+ hash: 7nc6rwxl5vjub4hxnqupqavqpi
+ path: patches/[email protected]
hash: kvggi4abfe6iel7wt6iiemonyq
path: patches/[email protected]
@@ -930,13 +933,13 @@ importers:
version: 1.58.2
playwright-extra:
specifier: ^4.3.6
+ version: 4.3.6(patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected])
prom-client:
specifier: ^15.1.3
version: 15.1.3
puppeteer-extra-plugin-stealth:
specifier: ^2.11.2
+ version: 2.11.2([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected]))
rss-parser:
specifier: ^3.13.0
version: 3.13.0
@@ -29989,7 +29992,7 @@ snapshots:
+ [email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected]):
dependencies:
debug: 4.4.1([email protected])
optionalDependencies:
@@ -30677,45 +30680,45 @@ snapshots:
dependencies:
escape-goat: 4.0.0
+ [email protected]([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected])):
dependencies:
debug: 4.4.1([email protected])
- puppeteer-extra-plugin: 3.2.3([email protected]([email protected])([email protected]))
- puppeteer-extra-plugin-user-preferences: 2.4.1([email protected]([email protected])([email protected]))
+ puppeteer-extra-plugin: 3.2.3([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected]))
+ puppeteer-extra-plugin-user-preferences: 2.4.1([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected]))
optionalDependencies:
- playwright-extra: 4.3.6([email protected])([email protected])
+ playwright-extra: 4.3.6(patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected])
transitivePeerDependencies:
- supports-color
+ [email protected]([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected])):
dependencies:
debug: 4.4.3
fs-extra: 10.1.0
- puppeteer-extra-plugin: 3.2.3([email protected]([email protected])([email protected]))
+ puppeteer-extra-plugin: 3.2.3([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected]))
rimraf: 3.0.2
optionalDependencies:
- playwright-extra: 4.3.6([email protected])([email protected])
+ playwright-extra: 4.3.6(patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected])
transitivePeerDependencies:
- supports-color
+ [email protected]([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected])):
dependencies:
debug: 4.4.1([email protected])
deepmerge: 4.3.1
- puppeteer-extra-plugin: 3.2.3([email protected]([email protected])([email protected]))
- puppeteer-extra-plugin-user-data-dir: 2.4.1([email protected]([email protected])([email protected]))
+ puppeteer-extra-plugin: 3.2.3([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected]))
+ puppeteer-extra-plugin-user-data-dir: 2.4.1([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected]))
optionalDependencies:
- playwright-extra: 4.3.6([email protected])([email protected])
+ playwright-extra: 4.3.6(patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected])
transitivePeerDependencies:
- supports-color
+ [email protected]([email protected](patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected])):
dependencies:
'@types/debug': 4.1.12
debug: 4.4.1([email protected])
merge-deep: 3.0.3
optionalDependencies:
- playwright-extra: 4.3.6([email protected])([email protected])
+ playwright-extra: 4.3.6(patch_hash=7nc6rwxl5vjub4hxnqupqavqpi)([email protected])([email protected])
transitivePeerDependencies:
- supports-color