zenbot
zenbot copied to clipboard
UI Root Not Working anymore due to MIME type restrictions
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.
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
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:
All this results to the Web GUI looking exactly like in issue https://github.com/DeviaVir/zenbot/issues/1581 with the same errors in the browsers console:
I'm having the same issue
I've fixed the issues in the following pull request: https://github.com/DeviaVir/zenbot/pull/2624
Let me know if there's any issues with the pull request.