dash: Dangerous link detected Error in Dash Debug Window after upgrading from 2.14.2 to 2.15.0

With Dash 2.14.2 all is good. After upgrade to 2.15.0, we receive a Dangerous link detected:: in the Dash Debug Window.

  • Dash versions
dash                        2.15.0
dash-bootstrap-components   1.5.0
dash-core-components        2.0.0
dash-html-components        2.0.0
dash-table                  5.0.0
  • Could be front end related, but should be on latest version of Chrome
    • Windows 10
    • Chrome
    • Version 121.0.6167.140 (Official Build) (64-bit)

It looks like the actual website is running OK and functional and it is possible not affected by the reported JavaScript error. Full Err Msg:

(This error originated from the built-in JavaScript code that runs Dash apps. Click to see the full stack trace or open your browser's console.)
Error: Dangerous link detected:: 

    at http://localhost:5000/_dash-component-suites/dash/dcc/dash_core_components.v2_13_0m1706882908.js:2:52506

    at commitHookEffectListMount (http://localhost:5000/_dash-component-suites/dash/deps/react-dom@16.v2_15_0m1706882909.14.0.js:19866:28)

    at commitPassiveHookEffects (http://localhost:5000/_dash-component-suites/dash/deps/react-dom@16.v2_15_0m1706882909.14.0.js:19904:13)

    at HTMLUnknownElement.callCallback (http://localhost:5000/_dash-component-suites/dash/deps/react-dom@16.v2_15_0m1706882909.14.0.js:182:16)

    at Object.invokeGuardedCallbackDev (http://localhost:5000/_dash-component-suites/dash/deps/react-dom@16.v2_15_0m1706882909.14.0.js:231:18)

    at invokeGuardedCallback (http://localhost:5000/_dash-component-suites/dash/deps/react-dom@16.v2_15_0m1706882909.14.0.js:286:33)

    at flushPassiveEffectsImpl (http://localhost:5000/_dash-component-suites/dash/deps/react-dom@16.v2_15_0m1706882909.14.0.js:22988:11)

    at unstable_runWithPriority (http://localhost:5000/_dash-component-suites/dash/deps/react@16.v2_15_0m1706882909.14.0.js:2685:14)

    at runWithPriority$1 (http://localhost:5000/_dash-component-suites/dash/deps/react-dom@16.v2_15_0m1706882909.14.0.js:11174:12)

    at flushPassiveEffects (http://localhost:5000/_dash-component-suites/dash/deps/react-dom@16.v2_15_0m1706882909.14.0.js:22955:14)

image

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

It worked, thanks for the help. If you ever write a book on Django integration of Dash Plotly & Dockerizing the web app. Believe me I will be the first one to buy that book. Once again thanks for the help.

On Tue, 13 Feb 2024 at 14:52, Ann Marie Ward @.***> wrote:

@pat1510 https://github.com/pat1510 Please ask your question on the Dash Community Forum https://community.plotly.com/. I’ll be happy to help you over there.

This issue is now closed.

— Reply to this email directly, view it on GitHub https://github.com/plotly/dash/issues/2743#issuecomment-1941565605, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANX5J6KI3XPNCPT7CEPXXI3YTNVZDAVCNFSM6AAAAABCW7E63KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBRGU3DKNRQGU . You are receiving this because you were mentioned.Message ID: @.***>

– Regards, Prasad C. Zende +43-6642495138

@pat1510 That’s a great topic for the forum - please ask over there 🙂

@pat1510

In the last callback I see you are returning the csv data to the href prop. This is being flagged as an invalid (dangerous) link.

I recommend using the dcc.Download component instead. See more info in the Dash docs

If you have any more questions, please feel free to ask them on the Dash Community Forum

Hi @pat1510 Look for a component that looks like:

dcc.Link("link name", href="")

and change it to:

dcc.Link("link name", href="/")

If that doesn’t work, could you please make a minimal example so I could run it, and see the error?