Plugin install - error (Error: ✗ failed to convert to plugin DTO: could not find plugin.json or dist/plugin.json for in)

Dear community,

I am using the Grafana Operator and want to install a plugin without using CRDs, specifically: fifemon-graphql-datasource.

I injected an environment variable into the Grafana CRD:

env:
  - name: GF_INSTALL_PLUGINS
    value: 'https://NEXUSURL.zip;fifemon-graphql-datasource'

The pod restarts (due to the Operator), picks up the config, and attempts to install the plugin. The following appears in the /var/lib/grafana/plugins directory:

/var/lib/grafana/plugins $ ls -la
total 256
drwxrwsr-x    3 10004500 10004500      4096 Dec  9 15:54 .
drwxrwsr-x    7 root     10004500      4096 Dec  9 15:54 ..
-rw-r--r--    1 10004500 10004500      1368 Dec  9 15:54 CHANGELOG.md
-rw-r--r--    1 10004500 10004500       631 Dec  9 15:54 LICENSE
-rw-r--r--    1 10004500 10004500      1892 Dec  9 15:54 MANIFEST.txt
-rw-r--r--    1 10004500 10004500      5602 Dec  9 15:54 README.md
drwxr-sr-x    2 10004500 10004500      4096 Dec  9 15:54 fifemon-graphql-datasource
-rw-r--r--    1 10004500 10004500       191 Dec  9 15:54 index.html
-rw-r--r--    1 10004500 10004500    115023 Dec  9 15:54 module.js
-rw-r--r--    1 10004500 10004500    101473 Dec  9 15:54 module.js.map
-rw-r--r--    1 10004500 10004500      1064 Dec  9 15:54 plugin.json

The plugin directory contains:

/var/lib/grafana/plugins $ ls -la fifemon-graphql-datasource
total 16
drwxr-sr-x    2 10004500 10004500      4096 Dec  9 15:56 .
drwxrwsr-x    3 10004500 10004500      4096 Dec  9 15:56 ..
-rw-r--r--    1 10004500 10004500      2447 Dec  9 15:56 annotations.editor.html
-rw-r--r--    1 10004500 10004500      2723 Dec  9 15:56 logo.svg

However, the container fails to start with the following error:

Error: ✗ failed to convert to plugin DTO: could not find plugin.json or dist/plugin.json for in /var/lib/grafana/plugins/fifemon-graphql-datasource

Does anyone have a solution for this?
Information about version: Grafana Operator - 5.15.1 provided by Grafana Labs

Thanks a lot.

What is in that zip file https://NEXUSURL.zip?

That doesn’t reflect folder /var/lib/grafana/plugins/fifemon-graphql-datasource. So you have something wrong. You didn’t disclose NEXUSURL or full reproducible example of your deployment, so it is hard to say what you are doing wrong.

What do you mean? So the zip should contain the fifemon-graphql-datasource folder? And that folder should contain the files showed in the folder?
Right now, the zip just contain the files listed on the pictures

I mean that this:

is not this:

They should be identical.

Yes but Grafana did this, as I saw it extracted the file from the folder:

var/lib/grafana/plugins $ ls -la
total 256
drwxrwsr-x    3 10004500 10004500      4096 Dec  9 15:54 .
drwxrwsr-x    7 root     10004500      4096 Dec  9 15:54 ..
-rw-r--r--    1 10004500 10004500      1368 Dec  9 15:54 CHANGELOG.md
-rw-r--r--    1 10004500 10004500       631 Dec  9 15:54 LICENSE
-rw-r--r--    1 10004500 10004500      1892 Dec  9 15:54 MANIFEST.txt
-rw-r--r--    1 10004500 10004500      5602 Dec  9 15:54 README.md
drwxr-sr-x    2 10004500 10004500      4096 Dec  9 15:54 fifemon-graphql-datasource
-rw-r--r--    1 10004500 10004500       191 Dec  9 15:54 index.html
-rw-r--r--    1 10004500 10004500    115023 Dec  9 15:54 module.js
-rw-r--r--    1 10004500 10004500    101473 Dec  9 15:54 module.js.map
-rw-r--r--    1 10004500 10004500      1064 Dec  9 15:54 plugin.json

Clear that rubbish, so plugin folder is empty.
Upgrade to the latest stable Grafana version.
Maybe your zip file is a problem. Simulate unzip to the folder in cli.

Grafana Operator - 5.15.1 provided by Grafana Labs
This is the latest available from Openshift marketplace. I did a clear for the plugins folder and same situation happened.

/var/lib/grafana/plugins $ ls -la
total 256
drwxrwsr-x    3 10004500 10004500      4096 Dec 10 07:36 .
drwxrwsr-x    7 root     10004500      4096 Dec 10 07:36 ..
-rw-rw-r--    1 10004500 10004500      1368 Dec 10 07:36 CHANGELOG.md
-rw-rw-r--    1 10004500 10004500       631 Dec 10 07:36 LICENSE
-rw-rw-r--    1 10004500 10004500      1892 Dec 10 07:36 MANIFEST.txt
-rw-rw-r--    1 10004500 10004500      5602 Dec 10 07:36 README.md
drwxr-sr-x    2 10004500 10004500      4096 Dec 10 07:36 fifemon-graphql-datasource
-rw-rw-r--    1 10004500 10004500       191 Dec 10 07:36 index.html
-rw-rw-r--    1 10004500 10004500    115023 Dec 10 07:36 module.js
-rw-rw-r--    1 10004500 10004500    101473 Dec 10 07:36 module.js.map
-rw-rw-r--    1 10004500 10004500      1064 Dec 10 07:36 plugin.json
/var/lib/grafana/plugins $ ls -la fifemon-graphql-datasource/
total 16
drwxr-sr-x    2 10004500 10004500      4096 Dec 10 07:36 .
drwxrwsr-x    3 10004500 10004500      4096 Dec 10 07:36 ..
-rw-r--r--    1 10004500 10004500      2447 Dec 10 07:36 annotations.editor.html
-rw-r--r--    1 10004500 10004500      2723 Dec 10 07:36 logo.svg

Grafana version != Grafana operator version.

It works on my machine:

% docker run --name grafana -e GF_INSTALL_PLUGINS='https://github.com/fifemon/graphql-datasource/releases/download/v1.3.0/fifemon-graphql-datasource-1.3.0.zip;fifemon-graphql-datasource' -d grafana/grafana:11.3.2
3c42807ceb19fdf3e8fb18adc0ab739f69dcf61a35c701962bd2273c3ba3f628
% docker exec -ti grafana ls -lah /var/lib/grafana/plugins                           
total 16K    
drwxrwxrwx    1 grafana  root        4.0K Dec 10 10:48 .
drwxrwxrwx    1 grafana  root        4.0K Dec 10 10:48 ..
drwxr-xr-x    4 grafana  root        4.0K Dec 10 10:48 fifemon-graphql-datasource
% docker exec -ti grafana ls -lah /var/lib/grafana/plugins/fifemon-graphql-datasource
total 256K   
drwxr-xr-x    4 grafana  root        4.0K Dec 10 10:48 .
drwxrwxrwx    1 grafana  root        4.0K Dec 10 10:48 ..
-rw-r--r--    1 grafana  root        1.3K Dec 10 10:48 CHANGELOG.md
-rw-r--r--    1 grafana  root         618 Dec 10 10:48 LICENSE
-rw-r--r--    1 grafana  root        1.8K Dec 10 10:48 MANIFEST.txt
-rw-r--r--    1 grafana  root        5.3K Dec 10 10:48 README.md
drwxr-xr-x    2 grafana  root        4.0K Dec 10 10:48 img
-rw-r--r--    1 grafana  root         183 Dec 10 10:48 index.html
-rw-r--r--    1 grafana  root      109.4K Dec 10 10:48 module.js
-rw-r--r--    1 grafana  root       99.1K Dec 10 10:48 module.js.map
drwxr-xr-x    2 grafana  root        4.0K Dec 10 10:48 partials
-rw-r--r--    1 grafana  root        1.0K Dec 10 10:48 plugin.json