Kibana plugin development: Error when creating plugin in Kibana 8.6

When I create and run plugins, the following error occurs.

Refused to execute script from 'http://localhost:5601/mvk/9007199254740991/bundles/plugin/helloKibana/1.0.0/helloKibana.plugin.js' 
because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.

It's the same problem as the previous topic, but there was no solution.


Hi EunYeong,

Hope you are doing well.

Which version of Kibana are you using?

Is ms_sql the id of your plugin?
And can you also check if u already have a plugin that id?

Or have tried installing or creating another plugin with same id before, but later might have deleted it? If yes, then delete kibana cache and run again.

Do let me know if it works.

Regards,
Sheereen

Thank you for your reply.
I'm using Kibana 8.6.

As you told me, I solved the error about ms_sql, but I keep getting MIME type errors.
I'm not good at React, so I don't know where to specify the type exactly. :smiling_face_with_tear:

Did you try deleting the cache and running Kibana again?

Go to the kibana folder, then execute the following commands sequentially.
yarn cache clean
yarn kbn clean
yarn kbn bootstrap

Then go into your plugin folder and do:
npm i

Then start kibana with ..... yarn start.... in kibana folder

Moreover, mime type errors can come up if you have specified any incorrect file path in your plugin code.

And also, when you inspect your kibana page (right click -> choose inspect)
=> go to Network tab
=> there in the Name column, you will find <plugin_id>.chunk.js -> select it
=> You will find the General details, request and response headers for that request
=> Check the content-type in Response headers.... it should be application/javascript;

Moreover... I had encountered this error when I had shifted to 8.6after installing my custom plugin in another instance , few weeks after they released the version.

I then shifted back to the previous stable release, 8.5.3.... then there were no problems.

I'll try installing 8.6 and doing the same again.... so we can confirm whether it's an issue with the 8.6 version.

Thank you so much, @Sheereen

I'll keep trying!!!! :fire: :fire:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.