When I navigate to Projector tab, I got blank view. In browsers console I have the following errors:
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
about:blank:1 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:6006/data/plugin/projector/index.js
Hi @domsew! Thanks for the report. This is a bit surprising, as we
attempt to serve with the correct MIME type. We’ll take a look.
I can’t reproduce this with Chrome 77.0.3685.120 on Windows 10 with
TensorFlow 2.0.0 and TensorBoard 2.0.0 installed into a fresh
virtualenv. The network response has
Content-Type: application/javascript; charset=utf-8
and the plugin loads correctly.
Could you please run the diagnose_tensorboard.py script as requested
in the issue template so that we can narrow down what the problem might
be?
Diagnostics output
``````
--- check: autoidentify
INFO: diagnose_tensorboard.py version 4725c70c7ed724e2d1b9ba5618d7c30b957ee8a4
--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)
INFO: os.name: nt
INFO: os.uname(): N/A
INFO: sys.getwindowsversion(): sys.getwindowsversion(major=10, minor=0, build=18362, platform=2, service_pack='')
--- check: package_management
INFO: has conda-meta: False
INFO: $VIRTUAL_ENV: 'E:\proj\python\tensor13\env'
--- check: installed_packages
INFO: installed: tensorboard==2.0.0
INFO: installed: tensorflow==2.0.0
INFO: installed: tensorflow-estimator==2.0.0
--- check: tensorboard_python_version
INFO: tensorboard.version.VERSION: '2.0.0'
--- check: tensorflow_python_version
INFO: tensorflow.__version__: '2.0.0'
INFO: tensorflow.__git_version__: 'v2.0.0-rc2-26-g64c3d382ca'
--- check: tensorboard_binary_path
INFO: which tensorboard: b'E:\proj\python\tensor13\env\Scripts\tensorboard.exe\r\n'
--- check: readable_fqdn
INFO: socket.getfqdn(): '__BLACKOUT__.wew'
--- check: stat_tensorboardinfo
INFO: directory: C:\Users\DOMINI~1.SEW\AppData\Local\Temp.tensorboard-info
INFO: os.stat(...): os.stat_result(st_mode=16895, st_ino=178736610211420266, st_dev=2296647248, st_nlink=1, st_uid=0, st_gid=0, st_size=4096, st_atime=1571074304, st_mtime=1571074304, st_ctime=1569223329)
INFO: mode: 0o40777
--- check: source_trees_without_genfiles
INFO: tensorboard_roots (1): ['E:\proj\python\tensor13\env\lib\site-packages']; bad_roots (0): []
--- check: full_pip_freeze
INFO: pip freeze --all:
absl-py==0.8.1
astor==0.8.0
astroid==2.2.5
colorama==0.4.1
cycler==0.10.0
gast==0.2.2
google-pasta==0.1.7
grpcio==1.24.1
h5py==2.10.0
isort==4.3.21
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.1.0
lazy-object-proxy==1.4.1
Markdown==3.1.1
matplotlib==3.1.0
mccabe==0.6.1
numpy==1.17.2
opt-einsum==3.1.0
pandas==0.25.0
pip==19.2.3
protobuf==3.10.0
pylint==2.3.1
pyparsing==2.4.0
python-dateutil==2.8.0
pytz==2019.2
scipy==1.3.0
setuptools==41.4.0
six==1.12.0
tensorboard==2.0.0
tensorflow==2.0.0
tensorflow-estimator==2.0.0
termcolor==1.1.0
typed-ast==1.4.0
Werkzeug==0.16.0
wheel==0.33.6
wrapt==1.11.2
``````
I am trying to visualize MNIST, with tips (workaround) included here #2471
To create virtualenv I used _venv_ module.
Additionally, I can confirm that the problem also occurs on my Windows 7 laptop and _tensorflow 2.0.0rc0_.
+1 for tensorboard 2.0.1 (Chrome 78.0.3904.97 on Windows 10)
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:6006/data/plugin/projector/index.js
Here's the output of diagnose_tensorboard.py: https://gist.github.com/skearnes/35173051f183b2a228a003e46a1f68df
Is there anyone who figured out a workaround or fix? I can't get tensorboard to display in any windows browser.
I think William has already found a source of the problem: #3077. The code William linked does use guess_mimetype and it would definitely be text/plain in the bad environment described in the issue.
Yes—thanks for following up, @stephanwlee.
To affected users: The suspected root cause is that some other installed
application registered an incorrect MIME type entry as part of its
install process.
To check if this is the root cause on your machine: At a command
prompt, run:
python -c "import mimetypes; print(list(mimetypes.guess_type('index.js')))"
If it prints anything other than application/javascript, then this
issue affects you, and the problem is with your system configuration,
not TensorBoard itself.
To patch your system if affected: Remove any incorrect MIME type
associations from your Windows registry. My Windows-fu is not extensive,
but you could start by writing
reg delete HKCR\.js /v "Content Type"
at a command prompt with elevated privileges, accepting “yes” at the
confirmation prompt. If that doesn’t suffice, please consult external
docs for modifying the registry.
If mimetypes.guess_type is properly returning application/javascript
and you’re still experiencing this issue after restarting TensorBoard
(the mimetypes module has an in-memory cache), please check back and
we can investigate further. Thanks!
cc @skearnes @domsew
Thanks a lot!
In my case following procedure solved the problem:
thanks
Most helpful comment
Thanks a lot!
In my case following procedure solved the problem: