tensorboard icon indicating copy to clipboard operation
tensorboard copied to clipboard

404 on some images and fonts behind proxy

Open mtikekar opened this issue 6 years ago • 11 comments

I am using tensorboard behind a proxy at www.domain.com/tensorboard and it is making requests to paths such as www.domain.com/font-roboto/... and www.domain.com/tf-interactive-inference-dashboard/...

Can these be changed to have the /tensorboard prefix? FWIW, the --path_prefix option does not add the prefix to these urls.

For bug reports, please include the following:

  • TensorBoard version (from pip package, also printed out when running tensorboard): 1.12.2
  • TensorFlow version if different from TensorBoard: 1.12.0
  • OS Platform and version (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • Python version (e.g. 2.7, 3.5): 3.6.7
  • For browser-related issues:
    • Browser type and version (e.g. Chrome 64.0.3282.140)
    • Screenshot if it's a visual issue

Please describe the bug as clearly as possible, and if possible provide a minimal example (code, data, and/or command line) to reproduce the issue. Thanks!

mtikekar avatar Feb 23 '19 15:02 mtikekar

I found the webfiles.zip in the python package installation and copied over font-roboto and tf-interactive-inference-dashboard to the root website so that nginx can serve these static files. But there is also a trace_viewer_index.html and I'm not sure if it is ok for nginx to serve that too.

mtikekar avatar Feb 23 '19 15:02 mtikekar

Thanks for the report. The --path_prefix flag was broken in our 1.12 release, the imminent 1.13.0 release contains https://github.com/tensorflow/tensorboard/pull/1623 which I believe will fix this.

You can try this out by uninstalling tensorboard and installing our nightly build tb-nightly instead.

If for some reason that doesn't fix the issue, comment here and we can reopen and investigate.

nfelt avatar Feb 25 '19 18:02 nfelt

Can repro on 1.13.0: tensorboard --logdir=x --path_prefix=/foo then navigate to http://localhost:6006/foo/, and note that the UI is in sans-serif rather than Roboto (probably doesn’t repro if you have Roboto or Roboto-Regular as a system font). The JS routing was indeed fixed in #1623, and the What-If Tool’s images were fixed in #1738, but the fonts are a separate issue; the CSS always loads from root:

https://github.com/tensorflow/tensorboard/blob/5c384acb499ecc33e992ebb7c8cca56775a249f7/third_party/fonts.bzl#L425

wchargin avatar Feb 25 '19 18:02 wchargin

Hmm, thanks for catching this. Maybe we can just omit the leading / for those urls?

nfelt avatar Feb 25 '19 19:02 nfelt

Any progress on this issue? Seem still not resolved in 2.0.1

haobibo avatar Oct 31 '19 11:10 haobibo

The issue with font remains in 2.2.0. Also the profile plugin doesn't respect --path_prefix.

adampl avatar Jun 17 '20 21:06 adampl

This impacts jupyter_tensorboard integration as well.

I worked around it for jupyter_tensorboard in https://github.com/cliffwoolley/jupyter_tensorboard/commit/b351bb49ce91ae5922dd898452f6d6b7903b68a8 by making a static route for the /font-roboto/ URL prefix to whatever the first TensorBoard instance might be. But I think if we just could patch up the /font-roboto references to be instead ./font-roboto when inlining roboto.html to index.html. I tried ptaching it that way by hand, and the right thing seems to happen.

https://github.com/lspvic/jupyter_tensorboard/pull/63 includes my workaround in the meanwhile.

cliffwoolley avatar Feb 12 '21 19:02 cliffwoolley

Hello, we also have the issue in our tensorboard integration at Huggingface.

XciD avatar Dec 15 '21 15:12 XciD

+1

e-carlin avatar Jul 18 '22 20:07 e-carlin

Do you have any updates on this issue?

lichunqiang avatar Apr 30 '24 03:04 lichunqiang

This continues to be an issue. For static assets it appears to be a relatively simple fix to tensorboard/tools/import_google_fonts.py and re-importing so the URLs are relative (missing a leading slash). It may require a bit of string manipulation as-is. Alternately the vendored font files third_party/fonts.bzl can be fixed directly.

The fix would likely be much easier for a Googler - I think it would take some time for an external dev to figure out and setup all the Bazel stuff.

mharradon avatar Oct 02 '24 16:10 mharradon