googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.17k stars 705 forks source link

ProxyPort URL is broken as July 23rd #4738

Open jlopatec opened 1 month ago

jlopatec commented 1 month ago

As of July 23rd / 24th the proxy approach for a URL is broken from Colab with a 403. This is used to launch Tensorboard tools in a full URL.

from google.colab import output def open_window_to_port(port): print(output.eval_js(f'google.colab.kernel.proxyPort({port})'))

print('Must execute this cell first for the URL to work.')

The generated URL will only be valid while this notebook file is open.

open_window_to_port(port)

Example: https://colab.research.google.com/gist/blois/240fab81110daa9bbdb513c5b7b717cb/proxyport-examples.ipynb#scrollTo=gjqweJ0lUwWA

Screenshot 2024-07-27 at 1 41 23 PM
EvanWiederspan commented 3 weeks ago

Does serve_kernel_port_as_iframe work for you instead?

arizedatngo commented 2 weeks ago

Running into the same issue. I can get it into an iframe in the notebook cell myself, but it's a much worser experience to interact that way. I was personally hoping for the proxy approach for a URL to be working again

@EvanWiederspan do we know why this proxy approach for a URL broke?

jlopatec commented 2 weeks ago

Slightly suspicious this is related to secure cookie propagation in chrome browser, maybe a chrome browser change that affects the feature between colab server serving up a URL to the chrome browser.