Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

UI Root Not Working anymore due to MIME type restrictions #2581

Open
cmcgrath13 opened this issue Dec 27, 2020 · 3 comments
Open

UI Root Not Working anymore due to MIME type restrictions #2581

cmcgrath13 opened this issue Dec 27, 2020 · 3 comments

Comments

@cmcgrath13
Copy link

cmcgrath13 commented Dec 27, 2020

System information

  • Have I written custom code (as opposed to using zenbot vanilla): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20.04/Firefox 84.0 (64 bit)
  • Zenbot version (commit ref, or version): 4.1.0
  • Zenbot branch: unstable
  • NodeJS version: 10.19.0
  • Did I make any changes to conf-sample.js?: Yes

Describe the problem

Due to strict enforcement of MIME type matching, the UI root no longer works. This appears to have originated in Firefox version 72.0 where X-Content-Type-Options: nosniff was added to top level documents by default (source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options), mismatching the provided Content-Type of test/html for the JS bundles for the UI. This should be a simple fix consisting of updating the specified Content-Type from text/html to application/javascript.

I'd be more than happy to look into a fix for this, however, it looks like the echarts.bundle.js file required to make the dashboard work is transpiled/committed to the repo and the package.json does not contain the logic to build this. If you could please either help with a solution or point me in the right direction so I can work on it, that'd be great.

@lkunej
Copy link

lkunej commented Jan 4, 2021

Hi,

I'm having some issues with the web GUI also.
Setup info:

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
  • Zenbot version (commit ref, or version): 4.1.4
  • Zenbot branch: unstable
  • NodeJS version: 12.18.2
  • Python version (when using a python script): -
  • Exact command to reproduce (include everything): npm install --unsafe-perm
  • Did I make any changes to conf-sample.js?: No

I think the problem is when the post_install.js script gets to line to start webpack it fails because -p option for webpack -p is deprecated in 5.11.1
image

The -p flag used to mean "production", maybe for 5.11.1 it should be "webpack --mode production"?

after changing this line in the post_install script the error changes to:
image

All this results to the Web GUI looking exactly like in issue #1581 with the same errors in the browsers console:
image

@markup26
Copy link

I'm having the same issue

@fcjreed
Copy link
Contributor

fcjreed commented Jan 21, 2021

I've fixed the issues in the following pull request:
#2624

Let me know if there's any issues with the pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants