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

Panel not found #219

Open
ahhfat opened this issue Dec 30, 2024 · 5 comments
Open

Panel not found #219

ahhfat opened this issue Dec 30, 2024 · 5 comments
Labels

Comments

@ahhfat
Copy link

ahhfat commented Dec 30, 2024

Grafana version : Grafana v11.4.0

image

Token manually generated
image

Log :

logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:48.761033189Z level=info msg="generate report using config: Theme: light; Orientation: portrait; Layout: simple; Dashboard Mode: full; Time Zone: ; Encoded Logo: ; Max Renderer Workers: 4; Max Browser Workers: 2; Remote Chrome Addr: ; App URL: http://localhost:3000/; TLS Skip verifiy: true; Included Panel IDs: all; Excluded Panel IDs: none Included Data for Panel IDs: none" endpoint=callResource pluginID=mahendrapaipuri-dashboardreporter-app
logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:48.76179721Z level=info msg="generate report using local chrome" endpoint=callResource pluginID=mahendrapaipuri-dashboardreporter-app
logger=context userId=0 orgId=0 uname= t=2024-12-30T03:41:49.460429884Z level=info msg= error="[auth.unauthorized] cannot authenticate request" remote_addr=127.0.0.1 traceID=
logger=context userId=0 orgId=0 uname= t=2024-12-30T03:41:49.461734472Z level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=127.0.0.1 time_ms=1 duration=1.706359ms size=102 referer= handler=/api/live/ws status_source=server
logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:49.520925158Z level=error msg="could not unmarshal event: %v" EXTRA_VALUE_AT_END="unknown ClientNavigationReason value: initialFrameNavigation" endpoint=callResource pluginID=mahendrapaipuri-dashboardreporter-app subsystem=chromium
logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:49.524419289Z level=error msg="could not unmarshal event: %v" pluginID=mahendrapaipuri-dashboardreporter-app subsystem=chromium EXTRA_VALUE_AT_END="unknown ClientNavigationReason value: initialFrameNavigation" endpoint=callResource
logger=context userId=0 orgId=0 uname= t=2024-12-30T03:41:50.432372468Z level=info msg= error="[auth.unauthorized] cannot authenticate request" remote_addr=127.0.0.1 traceID=
logger=context userId=0 orgId=0 uname= t=2024-12-30T03:41:50.432582526Z level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=127.0.0.1 time_ms=0 duration=309.965µs size=102 referer= handler=/api/live/ws status_source=server
logger=rendering renderer=plugin t=2024-12-30T03:41:51.059007925Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=rendering renderer=plugin t=2024-12-30T03:41:51.07015329Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=rendering renderer=plugin t=2024-12-30T03:41:51.094639903Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=rendering renderer=plugin t=2024-12-30T03:41:51.128662863Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=context userId=22 orgId=1 uname=sa-1-extsvc-mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:52.453513604Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=127.0.0.1 time_ms=1 duration=1.627726ms size=0 referer= handler=/api/live/ws status_source=server
logger=context userId=22 orgId=1 uname=sa-1-extsvc-mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:52.495737265Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=127.0.0.1 time_ms=5 duration=5.091897ms size=0 referer= handler=/api/live/ws status_source=server
logger=context userId=22 orgId=1 uname=sa-1-extsvc-mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:52.588346947Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=127.0.0.1 time_ms=1 duration=1.842518ms size=0 referer= handler=/api/live/ws status_source=server
logger=context userId=22 orgId=1 uname=sa-1-extsvc-mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:52.617080151Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=127.0.0.1 time_ms=1 duration=1.920222ms size=0 referer= handler=/api/live/ws status_source=server
logger=rendering renderer=plugin t=2024-12-30T03:41:53.899293998Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=rendering renderer=plugin t=2024-12-30T03:41:53.905884013Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=rendering renderer=plugin t=2024-12-30T03:41:54.032079988Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=rendering renderer=plugin t=2024-12-30T03:41:54.045134888Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=context userId=22 orgId=1 uname=sa-1-extsvc-mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:55.348562749Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=127.0.0.1 time_ms=4 duration=4.527964ms size=0 referer= handler=/api/live/ws status_source=server
logger=context userId=22 orgId=1 uname=sa-1-extsvc-mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:55.40146607Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=127.0.0.1 time_ms=2 duration=2.683861ms size=0 referer= handler=/api/live/ws status_source=server
logger=context userId=22 orgId=1 uname=sa-1-extsvc-mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:55.460324599Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=127.0.0.1 time_ms=1 duration=1.675167ms size=0 referer= handler=/api/live/ws status_source=server
logger=context userId=22 orgId=1 uname=sa-1-extsvc-mahendrapaipuri-dashboardreporter-app t=2024-12-30T03:41:55.469859916Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=127.0.0.1 time_ms=5 duration=5.785484ms size=0 referer= handler=/api/live/ws status_source=server
logger=rendering renderer=plugin t=2024-12-30T03:41:56.810838932Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=rendering renderer=plugin t=2024-12-30T03:41:56.824905449Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22
logger=rendering renderer=plugin t=2024-12-30T03:41:56.994920252Z level=info msg=Rendering path="d-solo/c3738322-cba8-40a7-8a03-a11872ee70db/_?from=now-6h&height=500&panelId=0&theme=light&to=now&width=1000" userID=22

@mahendrapaipuri
Copy link
Owner

Hello,

Which version of plugin are you using? Which distro are you on? How did you install chromium?

Could you please enable debug logging on Grafana server and share more logs?

Cheers

@ahhfat
Copy link
Author

ahhfat commented Dec 30, 2024

Hi Mahendra,

Plugin version : v1.7.1
Grafana Image Renderer : 3.11.6
OS : Ubuntu 24.04.1 LTS
Chromnium : apt-get install chromium-browser
Logs :
log-render.txt

@mahendrapaipuri
Copy link
Owner

Cheers for the details @ahhfat

So, as I understand even when doing apt-get install chromium-browser, chromium from snap is getting installed. Actually I could not make the snap chromium work. I got the following errors when creating user profile directories:

logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-12-30T13:22:15.283501073+01:00 level=error msg="failed to start browser" endpoint=checkHealth err="couldn't create browser context: chrome failed to start:\ncmd_run.go:1276: WARNING: cannot create user data directory: cannot update the 'current' symlink of \"/usr/share/grafana/snap/chromium/current\": symlink 3010 /usr/share/grafana/snap/chromium/current: read-only file system\nneed to run as root or suid\n" pluginId=mahendrapaipuri-dashboardreporter-app

I assume you fixed those errors? Then I uninstalled the chromium from snap completely (including binaries) and then installed google-chrome from debian package installed from https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb. And then I set the env vars XDG_CONFIG_HOME=/tmp/.chrome and XDG_CACHE_HOME=/tmp/.chrome in Grafana process so when creating user profile directories, they will be created in the /tmp/.chrome folder. This approach worked and I could create reports.

Are you sure the browser started well with plugin? If you go to <grafana_url>/a/mahendrapaipuri-dashboardreporter-app/status you will see if plugin has started well or not. If everything on the browser side is working as expected, can you please try to generate report for this sample dashboard and see if it works? Is it possible to share your dashboard JSON model (redacting any sensitive info)?

Cheers

@ahhfat
Copy link
Author

ahhfat commented Dec 31, 2024

Hi Mahendra,

Here the information,

image

Sample dashboard log :

log2.txt

@mahendrapaipuri
Copy link
Owner

Cheers for the logs @ahhfat

Unfortunately I am not able to reproduce the bug. Infact I am not able to make plugin work with chromium installed from snap (I do not have any experience with snap eco-system).

One thing you can try is to completely uninstall chromium installed from snap (including binaries) and install google-chrome from https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb and retry. I could make it work on a fresh ubuntu 24.04 install using google-chrome. If you choose to go this way, ensure the chromium binary from snap is removed from PATH.

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

No branches or pull requests

2 participants