redash icon indicating copy to clipboard operation
redash copied to clipboard

Fix: Unable to open large Dashboard in Safari browser

Open iwakiriK opened this issue 3 years ago • 2 comments

What type of PR is this? (check all applicable)

  • [x] Bug Fix

Description

Due to a SecurityError, we are unable to open large dashboards in Safari browser. image

For more information, please see this issue. https://github.com/getredash/redash/issues/5333

The reason for this is that the value of parametersChanged is wrong. The comparison method is not deep equal, so it almost assigns true. https://github.com/getredash/redash/blob/v10.0.0-beta/client/app/components/Parameters.jsx#L57

This causes updateUrl runs frequently. As a result, history.replaceState runs frequently. https://github.com/getredash/redash/blob/v10.0.0-beta/client/app/components/Parameters.jsx#L62-L64

How to Reproduce

  • Create a parameter query
  • Create a Dashboard
  • Put about 40 of the queries in the Dashboard and save them.
  • Open the Dashboard in Safari and wait for 10 seconds.

Related Tickets & Documents

https://github.com/getredash/redash/issues/5333

iwakiriK avatar Sep 10 '21 06:09 iwakiriK

Tested this in my environment, fixes the Safari bug for me!

jimsparkman avatar Nov 29 '21 21:11 jimsparkman

Encountered this bug. @iwakiriK @susodapop any news regarding fix?

InvalidPointer avatar Mar 22 '22 08:03 InvalidPointer

@iwakiriK , thanks for the PR! Same here, we've updated a lot of things now that we're Community-driven so - if you're still interested in getting this merged - would you mind rebasing off master to re-run the CI? We should also address the feedback already given.

We're trying to clean up our PR todo list, so if you're not interested, that's fine - we'll close the PR in about a week if we don't hear back. If you're interested in reopening the PR afterwards, we would also very much welcome that.

guidopetri avatar Aug 20 '23 22:08 guidopetri

Rebased this onto master branch. Sounds like this PR is only a partial fix though, as per @susodapop's comment + screen recording above.

justinclift avatar Aug 22 '23 21:08 justinclift

Codecov Report

Merging #5586 (a9e8e68) into master (9751678) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #5586   +/-   ##
=======================================
  Coverage   60.70%   60.70%           
=======================================
  Files         154      154           
  Lines       12624    12624           
  Branches     1716     1716           
=======================================
  Hits         7663     7663           
  Misses       4735     4735           
  Partials      226      226           

codecov[bot] avatar Aug 22 '23 21:08 codecov[bot]