CagesThrottleUs
CagesThrottleUs

Reputation: 422

Getting Error 403 in Google Colab with Tensorboard with Firefox

I have a tfevent file already present on my Drive and I have successfully connected it to Google Colab. After searching within the issues of Tensorboard Github, I found that I had to set dom.serviceWorkers.enabled to True which I have done. But on Google Colab after performing the two steps:

  1. %load_ext tensorboard
  2. %tensorboard --logdir path/to/logs

I am getting a Error 403 on the second step cell:Error 403: google colab

I am using Firefox version 81.0.1 (64-bit) and my default mode is Private Window, so history and cache are cleared after I close all browser window.

Can someone help me with this?

Upvotes: 27

Views: 20515

Answers (6)

Fuat Ulugay
Fuat Ulugay

Reputation: 579

None of the above answers worked for me on Chrome. I checked it in Safari and it worked without any problem.

I found a workaround.

Execute tensorboard code twice it will give you a port number it is running. enter image description here

Right click on the page and select inspect. Go to Network tab and search the same port. In my case it was 6006. enter image description here

Richt click the URL and open in a new tab and it will work.

This is not a solution but workaround.

Upvotes: 2

princess_mononoke
princess_mononoke

Reputation: 31

In Firefox, you also have to untick the 'Delete cookies and site data when Firefox is closed' option in Settings.

Upvotes: 1

Rafael Toledo
Rafael Toledo

Reputation: 1064

For me, it worked on Firefox deactivating the Enhanced Tracking Protection.

enter image description here

Upvotes: 13

sa3036
sa3036

Reputation: 151

Try clearing logs if you are sure that the logs are not useful.

!rm -rf ./logs/ 

Reload the tensorboard again and check if it works.

Upvotes: 1

kitokid
kitokid

Reputation: 3117

I had faced the same issue as I had turned on 'Block third-party cookies' in chrome settings. Please refer to details issue threads here. I tried whitelisting of "googleusercontent.com", but it didn't work.

For Chrome,

1. chrome://settings/
2. Under Privacy and security >> Cookies and other site data >> Allow all cookies

For Brave,

1. Turn off the shields

Upvotes: 5

themenace
themenace

Reputation: 2810

It seems that Tensorboard needs you to enable third party cookies to run without returning a HTTP 403 (Forbidden) error.

I had the same issue using Chrome and fixed it by just allowing everything:

screenshot cookies chrome

You can do the same on Firefox like so:

screenshot firefox tracking protection

You could also find out which exact cookie is needed and then just allow that one.

Upvotes: 29

Related Questions