fr-ser / grafana-sqlite-datasource

Grafana Plugin to enable SQLite as a Datasource
Apache License 2.0
124 stars 17 forks source link

Can't create data source in Grafana (Cannot read property 'FormField') with Grafana 7.0.0-pre #41

Closed ataluzz closed 3 years ago

ataluzz commented 3 years ago

Hi! I'm having issues with creating data source. After adding plugin to my machine and trying to create data source in Grafana, I get error "Cannot read property 'FormField' of undefined Evaluating /.../module.js Loading plugins/frser-sqlite-datasource/module". Grafana version is v7.0.0-pre

fr-ser commented 3 years ago

Did you install it via the grafana-cli or manually? Which version did you install?

ataluzz commented 3 years ago

I installed it manually (.zip file) and I tried different versions (the last one and several previous), but in the end there was the same mistake.

fr-ser commented 3 years ago

I tried using the plugin just now on version 7.0.0 and 7.0.0-beta3. It worked both with my locally build file and with the version downloaded via grafana-cli.

Can/Did you try installing the plugin via grafana-cli?

ataluzz commented 3 years ago

No, I didn't, I'm not sure I can do this (because of my company's restrictions), but I'll try to clarify it. Thank you :)

fr-ser commented 3 years ago

Using the grafana-cli you can make sure, that you put the files at the right location. Please try using it. If this is not possible please provide some more details about where you extracted the files to. Maybe you can run some ls -lah commands to list the folder content...

ataluzz commented 3 years ago

I unpacked it in /data/plugins/ folder, other plugins are there and they work fine.

fr-ser commented 3 years ago

So the directories look like this? https://github.com/fr-ser/grafana-sqlite-datasource/issues/12#issuecomment-724632003

ataluzz commented 3 years ago

The contents - yes, just not in /var/lib/grafana/plugins, but in /grafana/data/plugins, that's directory which specified for plugin search in defaults.ini

fr-ser commented 3 years ago

Then I have nothing more to go on. It works in my test setup so there must be something different. Do you have any error logs from grafana itself?

ataluzz commented 3 years ago

Sorry, I misled you, I now discovered I don't have frser-sqlite-datasource/dist/ folder. Is it because I installed it not with grafana-cli?

ataluzz commented 3 years ago

But I still have gpx_sqlite-datasource_linux_amd64 file, so it shouldn't be problem, I guess?

ataluzz commented 3 years ago

I now tried to install it with grafana-cli and it didn't work out either.

fr-ser commented 3 years ago

Sorry, I misled you, I now discovered I don't have frser-sqlite-datasource/dist/ folder. Is it because I installed it not with grafana-cli?

The dist folder is optional now. So it should be ok

I now tried to install it with grafana-cli and it didn't work out either.

Same error message with the grafana-cli? Can you post here the an error screenshot and grafana error logs?

ataluzz commented 3 years ago

Yes, same error. It just writes "Cannot read property 'FormField' of undefined Evaluating /.../module.js Loading plugins/frser-sqlite-datasource/module" on top of the page. And I don't see anything relevant to this error in logs.

fr-ser commented 3 years ago

Can you give me the exact Grafana version? v7.0.0-pre does not exist on the Grafana release page.

ataluzz commented 3 years ago

From grafana-server -v I get "Version 7.0.0-pre (commit: 5a1fce1, branch: master).

fr-ser commented 3 years ago

From grafana-server -v I get "Version 7.0.0-pre (commit: 5a1fce1, branch: master).

In that case, I assume it is your own Grafana version built from the source files. In any case, I have no further idea how to debug this.

The only way to continue is to get a reproducible example. If you are able to create a docker-compose file (like the one in this repo here), where I can see that the plugin is not working I can use this. Without it, there is nothing I can think of...

ataluzz commented 3 years ago

Well, thank you for your time, I hope I'll resolve it someday :)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.