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

Execution context was destroyed, most likely because of navifation. #64

Open
martinbrasna opened this issue May 26, 2023 · 2 comments
Open

Comments

@martinbrasna
Copy link

Hello everybody,
I'm desperate - don't know what I'm doing wrong.
Running HASS on RPi3, hass-lovelace-kindle-screensaver worked well, until last week, when it starts falling. Now it refuses to create png file and quits on start.
I will be happy for any idea.
Thanks

[email protected] start
node index.js
Starting browser...
Visiting 'http://192.168.20.19:8123' to login...
Adding authentication entry to browser's local storage...
/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:265
throw new Error('Execution context was destroyed, most likely because of a navigation.');
^
Error: Execution context was destroyed, most likely because of a navigation.
at rewriteError (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:265:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ExecutionContext._evaluateInternal (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:219:60)
at async ExecutionContext.evaluate (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
at async /app/index.js:51:3
npm notice
npm notice New major version of npm available! 8.19.3 -> 9.6.7
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.7
npm notice Run npm install -g [email protected] to update!
npm notice

@megathlon
Copy link

megathlon commented Apr 30, 2024

Same problem here with a RPi3B. I think this error message about the destroyed execution context occurs when the cron schedule starts a new rendering while the previous one is still in progress.
I tried changing the cron string (e.g. from * * * * * to */10 * * * * for rendering only every 10 minutes) and increasing the rendering timeout, but even 10 minutes are not sufficient. I can see on the terminal with "top" that the CPU is busy (apparently 1 of the 2 cores) until either the timeout or the destruction of the execution context occurs. Unfortunately I have no idea what's wrong. But since the add-on seems to have worked for martinbrasna before, I assume the problem is not just a lack of CPU power/RAM.

@megathlon
Copy link

megathlon commented Jun 11, 2024

In my case it seems to help to

  • disable other add-ons. I suspect the small RAM (1 GB) of my RPi may be a problem.
  • render a simpler view (a simple dashboard)
  • restrict the image width 800 pixels (not sure this really makes a difference)
  • increase timeouts and create a screenshot only every 12 minutes.

Still, it does not always start successfully.

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