Hello Grafana community,
Context:
- Custom Panel created using
npx @grafana/create-plugin@latest
- Framework used: React in TypeScript
We’re developing a custom community Grafana panel plugin and we’re encountering a problem when using the Grafana plugin validator. I followed these steps to try to validate our plugin before submitting it for review:
PLUGIN_ID=$(grep '"id"' < src/plugin.json | sed -E 's/.*"id" *: *"(.*)".*/\1/')
cp -r dist "${PLUGIN_ID}"
zip -qr "${PLUGIN_ID}.zip" "${PLUGIN_ID}"
npx @grafana/plugin-validator@latest -sourceCodeUri file://. "${PLUGIN_ID}.zip"
We’re actually getting this output (the same output for the local version):
error: The provided JavaScript/TypeScript source code does not match your plugin archive assets.
detail: Verify the provided source code is the same as the one used to generate the plugin archive. If you are providing a git repository URL, make sure to include the correct ref (branch or tag) in the URL.
The following 1 file(s) differ when comparing source map with source code.
- ./palindrome/ sync
warning: unsigned plugin
detail: This is a new (unpublished) plugin. This is expected during the initial review process. Please allow the review to continue, and a member of our team will inform you when your plugin can be signed.
warning: plugin.json: should include screenshots for the Plugin catalog
detail: Screenshots are displayed in the Plugin catalog. Please add at least one screenshot to your plugin.json.
error: module.js: should not include tracking scripts
detail: Tracking scripts are not allowed in Grafana plugins (e.g. Google Analytics). Please remove any usage of tracking code. Found: om.au
-
Do you have any idea about the first error?
-
Regarding the second error, we are using a built (minified) version of our open-source library, Palindrome.js , as a third-party library inside our custom plugin panel React project. The error is telling us “Please remove any usage of tracking code. Found: om.au”, but actually, the
om.au
that it found is coming from this instruction “i.config.chart.zoom.autoScaleYaxis” that exists in our built file and it is not a tracking code. Any idea how to solve this?
Thank you for your assistance!