-
Notifications
You must be signed in to change notification settings - Fork 155
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
Full page screenshots not working with height != -1 for version >=3.8.4, "Error while waiting for the panels to loads" #488
Comments
Hi, @AgnesToulet! |
Hi @zifter, it seems like you are not using the image renderer as it is intended. I followed the steps you wrote to reproduce the issue and it seems like you want to render a screenshot of the full dashboard. If this is indeed the case, you should use In this case, it shouldn't timeout. |
@AgnesToulet thanks for the replay! I tested: Maybe there is some wrong waiting condition for the dashboard to finish loading? Because it's ok to render image with specified width and height |
I'd say, it's more a behavior that was working before but that we never intended to support as you should specify You're right to say this is related to this change but it fixes the condition that was broken before and didn't wait for anything. The condition to support waiting for the full dashboard to load is written before but it's used only if It could make sense to add a |
Hi,
Full output:
|
Hi @giuliomagnifico . How are you trying to render the image? Could you provide me the exact query params? |
What happened:
The latest version of grafana-image-renderer failed to render any dashboards in less than 60 seconds.
{"level":"debug","message":"Waiting for dashboard/panel to load","timeout":"60s"} {"level":"debug","message":"Browser request","method":"POST","url":"http://grafana:3000/api/frontend-metrics"} {"level":"debug","message":"Browser request finished","method":"POST","url":"http://grafana:3000/api/frontend-metrics"} {"err":"TimeoutError: Waiting failed: 60000ms exceeded\n at Timeout.<anonymous> (/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:59:37)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","level":"error","message":"Error while waiting for the panels to load","url":"http://grafana:3000/d/iUfmr5kMk/prometheus-2-22?orgId=1&width=1024&height=1024&render=1&render=1"} {"level":"debug","message":"Setting zoom level","zoomLevel":1} {"filePath":"/tmp/62cbb3db.png","level":"debug","message":"Taking screenshot"} {"level":"error","message":"Request failed","stack":"Error: Request aborted\n at onaborted (/usr/src/app/node_modules/express/lib/response.js:1052:15)\n at Immediate._onImmediate (/usr/src/app/node_modules/express/lib/response.js:1094:9)\n at process.processImmediate (node:internal/timers:476:21)","url":"/render?deviceScaleFactor=1.000000&domain=grafana&encoding=&height=1024&renderKey=mCgaaFqDE8KBALUazDrwOcTKnB3man0v&timeout=60&timezone=&url=http%3A%2F%2Fgrafana%3A3000%2Fd%2FiUfmr5kMk%2Fprometheus-2-22%3ForgId%3D1%26width%3D1024%26height%3D1024%26render%3D1%26render%3D1&width=1024"} {"err":"TimeoutError: Waiting failed: 60000ms exceeded\n at Timeout.<anonymous> (/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:59:37)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","level":"error","message":"Error while waiting for the panels to load","url":"http://grafana:3000/d/iUfmr5kMk/prometheus-2-22?orgId=1&width=1024&height=1024&render=1&render=1"} {"level":"debug","message":"Setting zoom level","zoomLevel":1} {"filePath":"/tmp/6ee09d17.png","level":"debug","message":"Taking screenshot"} {"file":"/tmp/6ee09d17.png","level":"debug","message":"Deleting temporary file"} {"level":"debug","message":"::ffff:172.27.0.4 - - [07/Jan/2024:10:02:17 +0000] \"GET /render?deviceScaleFactor=1.000000&domain=grafana&encoding=&height=1024&renderKey=ORjNjvnO5NWOynWvPJsWwod1WiqRmPFn&timeout=60&timezone=&url=http%3A%2F%2Fgrafana%3A3000%2Fd%2FiUfmr5kMk%2Fprometheus-2-22%3ForgId%3D1%26width%3D1024%26height%3D1024%26render%3D1%26render%3D1&width=1024 HTTP/1.1\" 200 157291 \"-\" \"Grafana/10.1.4\"\n"} {"level":"debug","message":"Connection closed","url":"http://grafana:3000/d/iUfmr5kMk/prometheus-2-22?orgId=1&width=1024&height=1024&render=1&render=1"}
What you expected to happen:
The latest grafana-image-renderer renders any dashboards correctly within a reasonable time range.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
It's working as expected in 3.8.3, but starts failing after 3.8.4 version.
I suppose the reason is changes made in https://github.com/grafana/grafana-image-renderer/pull/472/files.
panel-container class can't be found, but I see a dynamic style like css-1ijfwvk-panel-container.
I suppose it's not working with the latest Grafana setup.
Environment:
The text was updated successfully, but these errors were encountered: