Weave not works in remote Jupyter Lab

This might be a silly and somehow jupyter-related question (sorry in advanced if so), but couldn’t find solutions and appreciate if somebody helps.

I’m running Jupyter Lab with my local server in LAN(192.168.X.X) and access my notebooks from my Mac in the same LAN. Trying Weave Quickstart, Weave UI could not be rendered in a cell because “localhost refused to connect” (Chrome shows this, I guess)

In Jupyter Lab’s config, 192.168.X.X is bound (c.ServerApp.ip = '192.168.X.X').

I tried with Colaboratory too, it works. so, my Jupyter or server’s setting might be wrong, but I have no idea why triyng to access localhost(, which means my Mac)

Hello @kun432 !

This looks to be Jupyter Notebook struggling to connect to your server, not necessarily Weave that is having issue. Weave creates an IFrame so this is just a normal Jupyter Notebook output so I suspect it is something to do with your Jupyter instance. Does this error still show up if you restart the kernel as well as your Jupyter Instance?

Thanks for your reply. But restarting kernel does not solve.

checked IFrame’s URL and it’s like this:


In my remote server, the port above is opend and bind to localhost,

$ ss -tan | grep "36623"
LISTEN     0      128*

and can access via curl inside the remote server.

$ curl http://localhost:36623
<!DOCTYPE html>
  We disable Google Translate because it does not play well with React 16
  See https://github.com/facebook/react/issues/11538
<html lang="en" class="notranslate">
    <!-- anti-flicker snippet for Google Optimize -->
    <link rel="icon" href="/__frontend/favicon.ico" />
    <title>Weave Panel</title>
    <!-- See WeaveLoader.css for original source -->

I don’t know why this IFrame URL is bind to localhost.

Hello @kun432 !

Could you make non-Weave IFrames in your setup? This may have to do with hosting the server in LAN(192.168.X.X) and IFrame not being forwarding the IFrame to a LAN(192.168.X.X) rather than the localhost: URL like default JupyterLab Instances.

Thank you!

Trying with Plotly, which seems using IFrame too, and works OK.

Using Plotly, IFrame’s URL is like 192.168.X.X:8888/files/iframe_figures/figure_10.html?(snip). no problems.

Using Weave in my environment, there are 2 problems:

  • Weave seems always trying to bind IFrame’s URL to localhost
  • Weave seems always using a port randomly and also trying to bind the IP to localhost from the result of ‘ss’ command.

I see both Weave and Plotly uses IFrame but in different way to show their visuals so my trying above might means nothing. but as my guessing, If we use weave in Jupyter and Docker environment, this happens too, I guess.

Hello! I have been unable to replicate this on my end. I have been attempting to change my environment variables and setup to fit your and I think that I am missing something important. I will report this to the Weave team and see what they have to say about it.

1 Like

Hey @kun432, I’m taking over for Raph while he’s OOO. I just wanted to give you an update - our engineering team has eyes on this issue and I will update you when I know more.

1 Like

It worked for me after I port-forwarded the remote port being used for IFrame (port 32983) to my local in my case. Wonder if there’s a way to specify the port number in weave.

1 Like

@kun432 @shubhamgoel Our team just put out a PR for this that has been merged. Once there’s a new weave release, you should be able to update your Python weave package. Then, you’d need to set this env var like so prior to running your notebook:

WEAVE_FRONTEND_URL= http://192.168.X.X :XXXX jupyter notebook


Thank you for the prompt resolution. Looking forward to the next release!

1 Like

Thank you for great helps!

me, can’t wait for the next release, lol,
tried with the latest commit(d21717766e48eb38b4cd513ddb127d533454ac79) of main branch.
my procedures:

$ git clone https://github.com/wandb/weave
$  cd weave/
$ pip install -e .
$ WEAVE_FRONTEND_URL=http://192.168.XXX.XXX:8889 jupyter-lab --ip=''

my notebook.

import weave
from sklearn.datasets import load_iris

# use any existing dataframe, here we load the iris data and visualize the labels
iris = load_iris(as_frame=True)
df = iris.data.assign(target=iris.target_names[iris.target])


URL is like http://192.168.XXX.XXX:8889/__frontend/weave_jupyter?fullScreen&expNode=. Great!

but accessing the URL, seems inifite redirect loop.

redirected URL is like this.


hope this might help.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.