Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of custom plugin into docker image yielding mime type error - 8.15.1 #194336

Open
kianakiana opened this issue Sep 27, 2024 · 4 comments
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team

Comments

@kianakiana
Copy link

kianakiana commented Sep 27, 2024

Kibana version:
8.15.1

Elasticsearch version:
8.15.1

Describe the bug:
When developing locally, if you create a new plugin with node scripts/generate_plugin.js, and then start, you will get a mime type error described in #169719. this issue can be resolved when developing locally by running yarn dev --watch in your plugin root folder before starting kibana.
I'm getting the same error when trying to install a plugin onto the kibana docker image, but don't know how to cope with it in this context.

Steps to reproduce:

  1. From the root directory of your plugin, run 'yarn build' to produce build/< plugin >.zip
  2. Set up a docker development environment with the kibana 8.15.1 image
  3. in your Dockerfile, 'COPY path/to/< plugin >.zip /path/to/kibana/plugins' and then 'RUN /path/to/kibana/bin/kibana-plugins install file:/path/to/kibana/plugins/< plugin >.zip'
  4. in terminal, 'docker build --no-cache -t < image name specified in docker-compose > .' then 'docker compose up'
  5. go to your localhost

Expected behavior/Screenshots:
image

Browser console error:
The resource from "http://localhost:< port >/XXXXXXXXXX/bundles/plugin/< plugin name >/< plugin version >/< plugin name >.plugin.js was blocked due to MIME type ("application/json") mismatch (X-Content-Type-Options: nosniff)

@kianakiana kianakiana added the bug Fixes for quality problems that affect the customer experience label Sep 27, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 27, 2024
@dmlemeshko dmlemeshko added the Team:Operations Team label for Operations Team label Sep 30, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Sep 30, 2024
@kianakiana
Copy link
Author

kianakiana commented Oct 1, 2024

adding
server.securityResponseHeaders.xContentTypeOptions: null
to ur kibana.yml will fix the mime type issue; however it will still be throwing a 404 for the localhost:XXXX/XXXXX/bundles/< plugin >/< version >/< plugin >.plugin.js which is breaking kibana

@kianakiana
Copy link
Author

kianakiana commented Oct 3, 2024

UPDATE:

i just upgraded from 8.15.1=>8.15.2 and it seems to have solved the issue in conjunction with the changes to the kibana.yml

@delanni
Copy link
Contributor

delanni commented Jan 8, 2025

@kianakiana would it be OK to close this issue then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team
Projects
None yet
Development

No branches or pull requests

4 participants