Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Navigating frame was detached at #onFrameDetached #127

Closed
benkee opened this issue Apr 29, 2024 · 3 comments
Closed

Error: Navigating frame was detached at #onFrameDetached #127

benkee opened this issue Apr 29, 2024 · 3 comments

Comments

@benkee
Copy link

benkee commented Apr 29, 2024

Hi,

From today I've suddenly been experiencing this error:
Lambda Execution Exception for Wnx\SidecarBrowsershot\Functions\BrowsershotFunction: "Command failed: node ./browser.cjs '-f file:///tmp/browsershot.js' Error: Navigating frame was detached at #onFrameDetached (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js:110:47) at /opt/nodejs/node_modules/puppeteer-core/lib/cjs/third_party/mitt/index.js:1:269 at Array.map () at Object.emit (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/third_party/mitt/index.js:1:252) at CDPFrame.emit (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js:88:22) at #removeFramesRecursively (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.js:448:15) at #onClientDisconnect (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.js:114:42) . [TRACE] Error: Command failed: node ./browser.cjs '-f file:///tmp/browsershot.js' Error: Navigating frame was detached at #onFrameDetached (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js:110:47)".

Using:

  • PHP 8.2
  • "spatie/pdf-to-image": "^2.2"
  • "wnx/sidecar-browsershot": "^1.1"
  • "hammerstone/sidecar": "^0.4"
  • "spatie/browsershot": "^3.57".

Thanks

@stefanzweifel
Copy link
Owner

stefanzweifel commented Apr 29, 2024

Hi,

From today […]

There hasn't been a new release of sidecar-browsershot for a while now. Have you made any changes to your environment? Upgraded a package or deployed a new version of a Lambda function?

The version constraints you shared are vague, but I can already see that you're using an older version of sidecar-browsershot. v2 has been release a while ago, could you upgrade your project to the latest version and see if the error occurs again?

You can get the exact versions of installed packages by using this composer command:

composer show --locked --direct

Edit: And would you be able to share steps / code examples on how to reproduce this error?

@benkee
Copy link
Author

benkee commented Apr 30, 2024

Hi Stefan,

Thanks for your quick reply yesterday,

I managed to fix the issue yesterday by creating a new lambda instance (by changing the app & env name), rather than upgrading, this created a new instance on node 20, instead of node 18. It may be reproducible with node 18, but we've not had any issues with node 20. This was the case regardless of the sidecar version (1 or 2).

If there's any more information I can provide to help let me know,

Thanks :-)

@stefanzweifel
Copy link
Owner

Great to hear you could resolve the issue.
The latest version of the package already uses Node 20.
https://github.com/stefanzweifel/sidecar-browsershot/blob/main/src/Functions/BrowsershotFunction.php#L84-L90

Gonna close this issue now. If someone experiences the same issue, please comment below with details on how to reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants