When starting tensorboard I only get a blank white page. Tested on multiple browsers and scripts. I just updated to the new Tensorflow 2.0, yesterday with the older version it worked. If I mark the page it just shows 4 blue vertical lines. Inspecting the web page with chrome shows a lot of html code. Using VSCode, Win10 Chrome and Firefox.
I start tensorboard with any of these:
tensorboard --logdir ./logs
tensorboard --logdir ./logs --bind_all
tensorboard --logdir ./logs --host localhost --port 8080
Results are the same.
Also I get a strange error now with the new version if I take the official example and create the log_dir in the following way:
log_dir="logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
It raises the error "tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: logs/fit/20200107-131107train; No such file or directory [Op:CreateSummaryFileWriter]"
So I have to use os.path.join or just take no subdirectories.
from datetime import datetime
import tensorflow as tf
mnist = tf.keras.datasets.mnist
(x_train, y_train),(x_test, y_test) = mnist.load_data()
def create_model():
return tf.keras.models.Sequential([
tf.keras.layers.Flatten(input_shape=(28, 28)),
tf.keras.layers.Dense(512, activation='relu'),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(10, activation='softmax')
])
model = create_model()
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
log_dir= datetime.now().strftime("%Y%m%d-%H%M%S")
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)
model.fit(x=x_train,
y=y_train,
epochs=1,
validation_data=(x_test, y_test),
callbacks=[tensorboard_callback])
Diagnostics output
``````
--- check: autoidentify
INFO: diagnose_tensorboard.py version d515ab103e2b1cfcea2b096187741a0eeb8822ef
--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=6, micro=7, releaselevel='final', serial=0)
INFO: os.name: nt
INFO: os.uname(): N/A
INFO: sys.getwindowsversion(): sys.getwindowsversion(major=10, minor=0, build=17763, platform=2, service_pack='')
--- check: package_management
INFO: has conda-meta: False
INFO: $VIRTUAL_ENV: None
--- check: installed_packages
INFO: installed: tensorboard==2.1.0
INFO: installed: tensorflow==2.0.0
INFO: installed: tensorflow-estimator==2.0.1
--- check: tensorboard_python_version
INFO: tensorboard.version.VERSION: '2.1.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'C:\Python3\Scripts\tensorboard.exern'
--- check: addrinfos
socket.has_ipv6 = True
socket.AF_UNSPEC =
socket.SOCK_STREAM =
socket.AI_ADDRCONFIG =
socket.AI_PASSIVE =
Loopback flags:
Loopback infos: [(
Wildcard flags:
Wildcard infos: [(
--- check: readable_fqdn
INFO: socket.getfqdn(): 'dnpc.ddns.lcl'
--- check: stat_tensorboardinfo
INFO: directory: C:UsersPublicDocumentsWondershareCreatorTemp.tensorboard-info
INFO: os.stat(...): os.stat_result(st_mode=16895, st_ino=3096224744537609, st_dev=1926005927, st_nlink=1, st_uid=0, st_gid=0, st_size=0, st_atime=1578399251, st_mtime=1578399251, st_ctime=1578397643)
INFO: mode: 0o40777
--- check: source_trees_without_genfiles
INFO: tensorboard_roots (1): ['C:\Python3\lib\site-packages']; bad_roots (0): []
--- check: full_pip_freeze
INFO: pip freeze --all:
absl-py==0.7.0
astor==0.7.1
attrs==19.1.0
backcall==0.1.0
bayespy==0.5.18
bleach==3.1.0
cachetools==4.0.0
certifi==2019.3.9
chardet==3.0.4
click==7.0
clickclick==1.2.2
colorama==0.4.1
connexion==1.1.15
cycler==0.10.0
Cython==0.29.11
decorator==4.3.2
defusedxml==0.5.0
dlib==19.17.0
entrypoints==0.3
flask==1.0.3
gast==0.2.2
gmplot==1.2.0
google-auth==1.10.0
google-auth-oauthlib==0.4.1
google-pasta==0.1.8
gpx-parser==0.0.4
grpcio==1.26.0
h5py==2.9.0
idna==2.8
imageio==2.5.0
importlib==1.0.4
inflection==0.3.1
ipykernel==5.1.0
ipython==7.3.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
itsdangerous==1.1.0
jedi==0.13.3
Jinja2==2.10
joblib==0.13.2
jsonschema==3.0.1
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==6.0.0
jupyter-core==4.4.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.0.8
kiwisolver==1.0.1
Markdown==3.0.1
MarkupSafe==1.1.1
matplotlib==3.0.2
mistune==0.8.4
nbconvert==5.4.1
nbformat==4.4.0
networkx==2.2
notebook==5.7.4
numpy==1.16.1
oauthlib==3.1.0
openapi-spec-validator==0.2.7
opt-einsum==3.1.0
pandas==0.24.1
pandocfilters==1.4.2
parso==0.3.4
pickleshare==0.7.5
Pillow==6.0.0
pip==19.2.3
primo==1.0
prometheus-client==0.6.0
prompt-toolkit==2.0.9
protobuf==3.6.1
pyasn1==0.4.8
pyasn1-modules==0.2.7
Pygments==2.3.1
pykalman==0.9.5
pyparsing==2.3.1
PyQt5==5.12.1
PyQt5-sip==4.19.15
pyrsistent==0.14.11
python-dateutil==2.6.0
pytz==2018.9
pywinpty==0.5.5
pyyaml==5.1
pyzmq==18.0.1
qtconsole==4.4.3
requests==2.21.0
requests-oauthlib==1.3.0
rsa==4.0
scikit-learn==0.21.2
scipy==1.3.3
seaborn==0.9.0
Send2Trash==1.5.0
setuptools==44.0.0
six==1.12.0
sklearn==0.0
swagger-server==1.0.0
swagger-spec-validator==2.4.3
tensorboard==2.1.0
tensorflow==2.0.0
tensorflow-estimator==2.0.1
termcolor==1.1.0
terminado==0.8.1
testpath==0.4.2
tornado==6.0.1
traitlets==4.3.2
typing==3.6.2
urllib3==1.24.3
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.14.1
wheel==0.32.3
widgetsnbextension==3.4.2
wrapt==1.11.2
``````
No action items identified. Please copy ALL of the above output,
including the lines containing only backticks, into your GitHub issue
or comment. Be sure to redact any sensitive information.
Thanks for the report. If the 2 issues reported have different root causes, it may make sense to split this into 2 reports later.
1st issue
just shows 4 blue vertical lines
Could you please send a screenshot? When inspecting the page with Chrome, are there any errors in the "Console"?
2nd issue
Was this issue also happening in older versions of TensorBoard?
The error looks similar to one in https://github.com/ibab/tensorflow-wavenet/issues/255. Could you please try the workaround in that thread and let us know if it works?
Ok here are two screenshots. The console indeed shows an error. I googled it and it seems to be a problem that needs a fix in the registry, but I have the needed value missing, so I have to see what I do next.
The blank tensorboard page:
The console output:
I tried this and it works now, thanks ! (It is still kinda a bug I would say)
log_dir= ".\\logs\\test\\"+datetime.now().strftime("%Y%m%d-%H%M%S")
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)
Reporting that I have the same error in the browser. Tensorflow 2.0.0, tensorboard 2.1.0, tested in both firefox and chrome on windows 10. The installation is fresh from yesterday. Errors:
Refused to execute script from 'http://localhost:16838/index.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
The resource from “http://localhost:16838/index.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff)
The error was fixed by switching back to tensorboard 2.0.0.
pip uninstall tensorboard
pip install tensorboard==2.0.0
This looks like the same issue as this one: https://github.com/tensorflow/tensorboard/issues/3077. More context here: https://github.com/tensorflow/tensorboard/issues/2771
Can you please check the registry and make sure mimetype for JavaScript is not set to plaintext?
The issue was fixed by downgrading to tensorboard 2.0!
My Registry at Computer\HKEY_CLASSES_ROOT\.js has a value Content Type set to text/plain. I suppose its about that value. Here is an image of all values there:
I previously navigated to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.js because there supposedly should be such a value, but there wasn't. So I created it and set it to application/javascript and it didn't solve the issue.
@stephanwlee
I do have the mimetype set to test/plain. However, if something like visual studio makes tensorboard unusable without changing the registry as suspected by @wchargin, I think it probably deserves a fix as the proportion of people using visual studio is non negligible.
It works with tensorboard 2.0.0, so a fix could probably be found.
navigated to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.js
because there supposedly should be such a value, but there wasn't. So
I created it and set it toapplication/javascriptand it didn't
solve the issue.
My understanding is that HKCR is the preferred view because it shows a
union of HKLM and some other registry paths, which is why I mentioned
HKCR specifically in #3077 and #2771.
if something like visual studio makes tensorboard unusable without
changing the register as suspected by @wchargin, I think it probably
deserves a fix as the proportion of people using visual studio is non
negligible.
We’ve discussed this a bit internally and are probably willing to hack
around this on our side, given that it breaks a substantial portion of
users, even though the problem isn’t our fault.
I’ve filed #3120 to track this.
Yea, same issue. Current workaround is downgrading to tensorboard-2.0.2. This is definitely an issue with the new release.
I’ve drafted a patch for this that works around the problem on broken
Windows systems. The code is in #3128. Please give us a few days to sort
out some issues regarding nightly builds. Then, we can provide a nightly
package that you can install to verify the fix. If all goes well, we may
perform a point release of TensorBoard 2.1.1 with this fix.
I'm getting the same issue of a blank page....#35804
I also tried two different machines.
same here. lokking forward for a nightly.
By the Way, Internet Explorer shows some stuff-ish. I think this is current Security Behavior. Its a Feature. Not a Bug.
There might be a browser displaying tensorboard2.1 Correctly?
Within my Regitry there is no such value as mentioned in #3077
Edit:
A google search on the topic brings up that this is mostly caused by incorrectly configured server. or missing link
Within my Regitry there is no such value as mentioned in #3077
@forReason: Could you please post the output of
python -c "import mimetypes; print(list(mimetypes.guess_type('index.js')))"
on your machine?
By the Way, Internet Explorer shows some stuff-ish. I think this is
current Security Behavior. Its a Feature. Not a Bug.
Right. That TensorBoard only shows a blank page is clearly a bug, but
the underlying mechanism is an intentional security mechanism, so we
can’t endorse workarounds that suggest just disabling it. TensorBoard
only appears to work in Internet Explorer because IE is not correctly
handling the nosniff header.
lokking forward for a nightly.
We’re working for it—my apologies for the delay.
@wchargin I hope this is what you ment:
On the Server which Tensorboard is running on:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.C:Usersdrgadmin>python -c "import mimetypes; print(list(mimetypes.guess_type('index.js')))"
['text/plain', None]C:Usersdrgadmin>
On the Client which is accessing Tensorboard through Google Chrome:
Microsoft Windows [Version 10.0.18363.592]
(c) 2019 Microsoft Corporation. All rights reserved.C:Usersjulia>python -c "import mimetypes; print(list(mimetypes.guess_type('index.js')))"
['application/javascript', None]C:Usersjulia>
@forReason: Yes, thanks. The fact that the server gives text/plain
indicates that you’re hitting the same issue as everyone else here
(probably a bad registry entry, but could also be a bad system file
somewhere), which is expected to be fixed by this patch. Stay tuned.
@wchargin indeed. I found the regkey on the server and changed it. Fixed the Issue for me!
chiming in to say that I'm experiencing the same issue as of 1/22/20

Thank you all for your patience. We’ve gotten our nightlies rolling
again.
Please try uninstalling tensorflow and tensorboard and then
installing the latest tf-nightly, which will pull in the latest
TensorBoard tb-nightly. (Uninstalling first is necessary to prevent
Pip from corrupting your installation; using the latest tf-nightly is
necessary because the latest tb-nightly depends on nightly-only
TensorFlow features.)
On my Windows machine, this suffices to work around the problem.
I’ll leave this open for a bit; please let us know if this works for you
or if it doesn’t. We’ll also consider publishing a patch release so that
you don’t have to upgrade to the latest TensorFlow nightly.
@wchargin This did solve the blank TensorBoard problem, but now I have a blank Profiler problem.
I have the same issue. So frustrating. Been hours since I have been trying to fix it.
from tensorflow.keras.callbacks import TensorBoard
import time
NAME = "ResNet-mnts-{}".format(int(time.time()))
tensorboard = TensorBoard(log_dir="logs{}".format(NAME))


No Combination of the --logdir="logs" seem to be working
@Srijan1214 , thanks for the comment, the issue you posted looks like a different one from this broken profiler issue.
Based on the Console output (thanks for the screenshots!) it looks like https://github.com/tensorflow/tensorboard/issues/3120, a bug where incorrect mimetypes interfere with TensorBoard. For more updates / questions, I would post on the the other Github issue.
That bug was fixed in TensorBoard's 2.1.1 release, could you please try upgrading TensorBoard to 2.1.1 or greater and see if it works?
EDIT: whoops sorry, I misread this issue, but I think your post is relevant here. The fix (https://github.com/tensorflow/tensorboard/pull/3128) should still be part of the TensorBoard 2.1.1 release.
EDIT 2: sorry again, the fix is actually in TB 2.2.0, not 2.1.1.
I was having this issue in 2.1.1, completely blank screen yet commands like
tensorboard --logdir .\Tensorflow\logs\fit\20200313-131520 --inspect
return what i expect it to. I checked to see if i was having the same issue as @Srijan1214, and sure enough...

At the advice of @wchargin, i uninstalled 2.1.1 and installed tf-nightly, but this did not seem to fix the issue above.

Still returned blank screen in any browser i tested it in. Any suggestions would be appreciated!
I have a 10 days old windows instalation and this problem was plaguing me already, so I developed a temporary workaround for people coming here from searching all over the internet that doesn't involve changing registry (which usually is a better solution, except on my case):
First, check if you have the problem by running cmd.exe and executing the following:
python -c "import mimetypes; print(list(mimetypes.guess_type('index.js')))"
A correct output would be ['application/javascript', None], if you don't see that, proceed to fix:
mimetypes is usually found at C:\python38\Lib\mimetypes.py, there's a method guess_type at line 97 (may change depending on your version)
After the comment, add these lines at the start of the function (lines 116 and 117):
if (isinstance(url, str) and url[-3:] == '.js'):
return 'application/javascript', None
Then, run the console command again to check if it worked (it should print correctly).
Note: If you have tensorboard running while you fix it, you'll need to restart the process (tensorboard.exe) to clear its cache.
This was enough for me to transform the 100% blank page to a fully functional page from tensorboard.
Reporting that I have the same error in the browser. Tensorflow 2.0.0, tensorboard 2.1.0, tested in both firefox and chrome on windows 10. The installation is fresh from yesterday. Errors:
- In Chrome:
Refused to execute script from 'http://localhost:16838/index.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
- In Firefox:
The resource from “http://localhost:16838/index.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff)
The error was fixed by switching back to tensorboard 2.0.0.
pip uninstall tensorboard pip install tensorboard==2.0.0
@ReinforcedMan
Thank you!
I was trying everything on the internet for 4 hours, and found this, and the problem was solved.
Sorry all, my comment earlier was incorrect. The fix https://github.com/tensorflow/tensorboard/pull/3128 is actually present in TensorBoard 2.2.0, not in 2.1.1.
If anyone is seeing this issue, please upgrade to TensorBoard 2.2 or higher, and let us know if you still see a blank screen.
Thanks for the investigation from all! Closing this, since the root caused is fixed by https://github.com/tensorflow/tensorboard/pull/3128
I faced the text/plain issue in tensorboard==2.1.1. I uninstalled it and installed tensorboard==2.0.0 and with tensorboard --logdir=.\logs everything is working fine. So the point is the issue is present in 2.1.1
installing and uninstalling tensorboard fixed the issue in my case.
I had the same issue with Tensorboard 2.1.1 showing only totally blank page, after installation Visual Studio 2017.
Reinstalling the 2.1.1 did not help but upgrading to the 2.2.2 solved the issue !
So there is some bug in the 2.1.1 which is fixed in the 2.2.2.
Running TensorBoard 2.4.0 on Windows 10 and getting the same blank page issue.
Most helpful comment
Reporting that I have the same error in the browser. Tensorflow 2.0.0, tensorboard 2.1.0, tested in both firefox and chrome on windows 10. The installation is fresh from yesterday. Errors:
The error was fixed by switching back to tensorboard 2.0.0.