grafana-toolbox / panodata-map-panel

Map Panel for Grafana with improved convenience, robustness and features. Friendly fork of the original Grafana Worldmap Panel. Currently not maintained, but verified to work up to Grafana 9.
https://community.panodata.org/t/grafana-map-panel/121
GNU Affero General Public License v3.0
88 stars 31 forks source link

Grafana 8.0.0: Unknown provider: keybindingSrvProvider <- keybindingSrv #103

Closed jm66 closed 3 years ago

jm66 commented 3 years ago

Just upgraded to Grafana v8.0.0. The plugin area does not load and when try to edit the map settings I've got the following error:

TypeError: Cannot read property 'emit' of undefined
    at U (https://host.localdomain/public/build/default~DashboardPage~SoloPanelPage.08d1221db5b53eadbfe4.js:10:112)
    at div
    at i (https://host.localdomain/public/build/app.08d1221db5b53eadbfe4.js:4202:201976)
    at H (https://host.localdomain/public/build/default~DashboardPage~SoloPanelPage.08d1221db5b53eadbfe4.js:10:3075)
    at div
    at div
    at P (https://host.localdomain/public/build/default~DashboardPage~SoloPanelPage.08d1221db5b53eadbfe4.js:1:8114)
    at div
    at z (https://host.localdomain/public/build/default~DashboardPage~SoloPanelPage.08d1221db5b53eadbfe4.js:10:3303)
    at div
    at ne (https://host.localdomain/public/build/default~DashboardPage~SoloPanelPage.08d1221db5b53eadbfe4.js:10:11530)
    at k (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:70367)
    at div
    at t (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:1897376)
    at div
    at ce (https://host.localdomain/public/build/default~DashboardPage~SoloPanelPage.08d1221db5b53eadbfe4.js:10:14771)
    at k (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:70367)
    at div
    at r (https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:95:17727)
    at d (https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:19:62235)
    at p (https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:19:45858)
    at div
    at u (https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:95:3418)
    at https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:500:467
    at t (https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:19:38208)
    at t (https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:19:38642)
    at r (https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:19:39944)
    at j (https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:500:1015)
    at div
    at div
    at div
    at t (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:706836)
    at h (https://host.localdomain/public/build/app.08d1221db5b53eadbfe4.js:5433:31539)
    at div
    at div
    at W (https://host.localdomain/public/build/DashboardPage.08d1221db5b53eadbfe4.js:482:667)
    at DashboardPage
    at k (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:70367)
    at n (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:462197)
    at dr (https://host.localdomain/public/build/app.08d1221db5b53eadbfe4.js:5608:3196)
    at t (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:1206671)
    at t (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:1208716)
    at div
    at t (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:1203276)
    at div
    at at (https://host.localdomain/public/build/app.08d1221db5b53eadbfe4.js:3073:1106)
    at h (https://host.localdomain/public/build/app.08d1221db5b53eadbfe4.js:5431:19756)
    at Di (https://host.localdomain/public/build/app.08d1221db5b53eadbfe4.js:3724:564)
    at Ei (https://host.localdomain/public/build/app.08d1221db5b53eadbfe4.js:3724:848)
    at l (https://host.localdomain/public/build/vendors~app.08d1221db5b53eadbfe4.js:2:68275)
    at Nr (https://host.localdomain/public/build/app.08d1221db5b53eadbfe4.js:5621:300)

The console throws this exception:

react_devtools_backend.js:2560 Plugin component error Error: [$injector:unpr] Unknown provider: keybindingSrvProvider <- keybindingSrv
https://errors.angularjs.org/1.8.2/$injector/unpr?p0=keybindingSrvProvider%20%3C-%20keybindingSrv
    at angular.js:138
    at angular.js:4991
    at Object.s [as get] (angular.js:5151)
    at angular.js:4996
    at Object.s [as get] (angular.js:5151)
    at t.getKeybindingSrv (chrome.ts:74)
    at t.restoreEscapeKeyBinding (chrome.ts:69)
    at e.setupGlobal (worldmap_ctrl.ts:171)
    at e [as constructor] (worldmap_ctrl.ts:133)
    at Object.invoke [as oldInvoke] (angular.js:5208)
MarcoPignati commented 3 years ago

could it be due to the fact that the plugin is unsigned? sudo systemctl status grafana-server.service returns ... /usr/sbin/grafana-server[7868]: t=2021-06-09T09:26:18+0200 lvl=warn msg="Some plugin scanning errors were found" logger=plugins errors="plugin 'grafana-map-panel' is unsigned" ... there is a way to allow unsigned plugins here (haven't tried it yet), but maybe it should be signed to be on the safe side.

jm66 commented 3 years ago

Already allowed grafana-map-panel to load in grafana.ini:

[plugins]
;enable_alpha = false
;app_tls_skip_verify_insecure = false
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
allow_loading_unsigned_plugins = grafana-map-panel
amotl commented 3 years ago

Hi @jm66,

thank you very much for reporting your observations. We will have to look into this issue.

Attaching to the Unknown provider: keybindingSrvProvider <- keybindingSrv error you reported: This is related to the ignoreEscapeKey feature, coming from community requests outlined within https://github.com/grafana/grafana/issues/11636 and https://github.com/grafana/grafana/issues/13706 and implemented here by eea48c41.

So, we will have to discover an alternative to the current implementation [1] to get hold of the keybinding service component of Grafana 8. Maybe you can look into that already? Alternatively, we can try to conditionally disable this feature on Grafana 8.

With kind regards, Andreas.

[1] https://github.com/panodata/grafana-map-panel/blob/0.15.0/src/chrome.ts#L72-L75

amotl commented 3 years ago

Dear @jm66 and @MarcoPignati,

Alternatively, we can try to conditionally/gracefully disable the ignoreEscapeKey feature on Grafana 8.

I just implemented this with #104. Can you check this and maybe verify if that would already work in order to make this plugin compatible with not croak on Grafana 8?

With kind regards, Andreas.

ShagoY commented 3 years ago

Sorry to hijack this conversation i use grafana under docker. So i use the grafana-cli (see) to install the plugin (version 0.15.0). Is there any way I can take advantage of this patch without having to create a development environment or create my own docker image?

MarcoPignati commented 3 years ago

I confirm that #104 seems to fix the issue

amotl commented 3 years ago

Hi there,

thanks for your confirmation. Unfortunately, I haven't been able to get around cutting a new release before my vacation. I will be back around 15th of July and will try to do that right away when I am back at the keyboard.

Cheers, Andreas.

/cc @birdayz

On 29 June 2021 20:08:29 CEST, MarcoPignati @.***> wrote:

I confirm that #104 seems to fix the issue

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/panodata/grafana-map-panel/issues/103#issuecomment-870807277

-- Sent from my mind. This might have been typed on a mobile device, so please excuse my brevity.

andsens commented 3 years ago

In the meantime folks are welcome to use the release I made: https://s3-eu-west-1.amazonaws.com/orbit-binaries/grafana-map-panel-0.15.1.zip?AWSAccessKeyId=AKIAZVIOIP7XHYMMSIG6&Expires=1628237959&Signature=jgruQTGAsT5dF0zAixb4ZeEfx3A%3D

I cloned the repo, bumped the version, ran yarn install --frozen-lockfile, make, and then zipped it. So it's pretty easy to do it yourself (provided you have the dependencies like npx and yarn installed).

Note that the URL expires aug. 6, I assume @amotl will have released a patched version by then :-)

amotl commented 3 years ago

Thanks a stack!

On 7 July 2021 10:24:53 CEST, Anders Ingemann @.***> wrote:

In the meantime folks are welcome to use the release I made: https://s3-eu-west-1.amazonaws.com/orbit-binaries/grafana-map-panel-0.15.1.zip?AWSAccessKeyId=AKIAZVIOIP7XHYMMSIG6&Expires=1628237959&Signature=jgruQTGAsT5dF0zAixb4ZeEfx3A%3D

I cloned the repo, bumped the version, ran yarn install --frozen-lockfile, make, and then zipped it. So it's pretty easy to do it yourself (provided you have the dependencies like npx and yarn installed).

Note that the URL expires aug. 6, I assume @amotl will have released a patched version by then :-)

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/panodata/grafana-map-panel/issues/103#issuecomment-875399946

-- Sent from my mind. This might have been typed on a mobile device, so please excuse my brevity.

wols commented 3 years ago

Grafana 8.0.5 Look at Visual options > Center and zoom level: The four fields are not usable if Fit to data disabled.

amotl commented 3 years ago

Hi there,

thank you very much for providing the interim release artefact, @andsens. Finally, I have been able to find some time to issue the regular release (0.16.0), see https://github.com/panodata/panodata-map-panel/releases/tag/0.16.0. We will be happy to receive any feedback how this version works.

Please note that the plugin name changed to panodata-map-panel in order to support #112.

With kind regards, Andreas.

amotl commented 3 years ago

Hi again,

I believe this issue has been resolved, a followup note is #122. Feel free to reopen if you need to.

With kind regards, Andreas.