-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting a 403 error when running dash app on Google collab #3271
Comments
The dash app is starting a local server on the remote VM you're connected to, so clicking the link from your own browser won't work. You'll want to explore port forwarding or some other solution that would allow you to connect to the process running in the remote Colab VM. That's beyond our support, so you might want to try asking on Stack Overflow. |
In fact, we have a library that should handle this for you:
should get you up and running. |
Can I re-open this? Tried the solution provided by craigcitro but I am getting the same error after Chrome's latest update 127.0.6533.89 (Official Build) (64-bit) (cohort: Stable). |
@roni9826 I am having the same problem and have a very temporary solution that is working for me. The issue seems to be due to an update in Google Chrome. I was able to get the dashboard working again on my Mac by downloading the file for Chrome version (125.0.6422.142 After I downgraded, the Collab dash worked again. I like to have the latest security features, so I don't like running on the downgraded version, but I figured It should be ok for a month or two, but long term I would like to have the latest version of Chrome and have Collab working too. Also, the Mac is my personal computer and I cannot change the version of Chrome on my work computer as it is a Google admin setting. So a very temporary solution. I started looking to see if I can fix the issue on my work computer by solving the 403 error and I think I made progress but not sure. I fed the change longs to Gemini 1.5 Pro Experimental model and it said: Based on the information provided, the most likely culprit for the 403 Forbidden error after the Chrome update is the change related to SVG resource documents introduced in Chrome version 126.0.6478.61. Here's a breakdown of why and potential solutions: Why the SVG Change Matters: The commit How Plotly Dash Uses SVGs: Plotly Dash heavily relies on SVGs for rendering charts and graphs. If your dashboard uses custom SVGs or relies on specific ways of loading SVG resources, the change in Chrome's handling of SVG document roots could be interfering with this process. Recommendations to Fix the Issue:
Example of CORS Configuration (if applicable): If your SVGs are hosted on a different domain, you'll need to add CORS headers to the server hosting the SVGs. Here's an example for an Apache server using <IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*" # Or specify your Dash app's domain
</IfModule> Important Considerations:
By systematically investigating the network requests, reviewing SVG loading methods, and considering server-side configurations, you should be able to identify the root cause of the 403 error and resolve the issue with your Plotly Dash application in the newer Chrome versions. |
I think it's related to This issue. In the past it looks like adding the param csrf_protect=False to the dash app would fix the issue, but it has since been deprecated. |
Describe the current behavior
A clear and concise explanation of what is currently happening.
Describe the expected behavior
A clear and concise explanation of what you expected to happen.
What web browser you are using
(Chrome, Firefox, Safari, etc.)
Additional context
Link to a minimal, public, self-contained notebook that reproduces this issue.
The text was updated successfully, but these errors were encountered: