Issue Summary

In the public dashboards, if the user changes the global parameters, the visualization keeps showing refreshing. After refreshing the whole page or re-entering the page, the parameters work. Are there any system settings that need to be adjusted?

Technical details:

  • Redash Version: 9.0.0-beta
  • Browser/OS: Chrome
  • How did you install Redash: docker

I checked the network tab in the browser, after changing the parameter all the requests with the name results have the status code 200 and in the response, the stage is 1, and the result is null, like below show:

{
    "job": {
        "id": "cd2294bb-a2e9-4e79-94a9-7c7f608f363c",
        "updated_at": 0,
        "status": 1,
        "error": "",
        "result": null,
        "query_result_id": null
    }
}```

Status 1 means the job was enqueued successfully.

Do you see periodic requests (once per second) that check for more results?

Why are you using the v9 beta instead of the v10 release?

No, after giving the response with the null results, there is no more request. BTW, we assign an HTTPS domain to the redash. May that cause the issue?

And do you mean upgrading to v10 would help with this?

Hmmm something sounds wrong there. It’s completely normal for the result to be null in this request. Sounds the front-end just stops polling the jobs api for a new result. Which explains your behavior. Odd that we haven’t seen this reported elsewhere.

re: V10 it’s best to use the latest version of Redash because that’s the one that receives the most development attention and fixes :slight_smile:

So you mean the in the public dashboard page, normally it keeps sending the request to poll the jobs API? However, on our side, we have to refresh the whole page… Do we need to play with some environment parameters(like FRAME_OPTIONS , FRAME_OPTIONS_ALLOW_FROM , CONTENT_SECURITY_POLICY , etc.)? Or you’d more suggest double-checking our HTTPS settings? Thanks!

Oh, there is one more thing I forgot to mention, the server was down days ago, and I only restart the server. Will this cause the issue? Do I actually need to back up the PostgreSQL and run docker compose build to rebuild all the services?

I just tried to restart the scheduler and worker separately, now in the public dashboard page, now I see some responses containing the data, however, the dashboards are still showing the loading logo without any update.

One more thing, during the dashboard showing the loading logo, if I change to some other parameters, there was no request made, looks like it stuck somewhere.

It’s not clear the state of your system. All the services must be running. Do you see anything in your logs?

Yes, they are running, and I can see the logs updating. But the public dashboards don’t refresh.

The important question we still don’t have an answer for is why the widgets do not appear to be polling the server for updated result. Do you see anything in your browser console?

this is the browse console

here are the latest logs from server

and here are the latest logs from worker

and here are the latest logs from scheduler

Those screenshots seem like everything is fine…The results have loaded.

Going back to the beginning though: what’s your expected behavior here? What do you expect to happen that isn’t happening?

@jesse The thing is that the public dashboard doesn’t update the viz. As you can see in the screenshot, it just keeps showing the loading or refreshing logo but the viz didn’t change

What happens if you load this dashboard when logged-in?

just to clarify the publish dashboard means the dashboard opened using the secret address generated by share Dashboard -> Allow public access. On the ReDash dashboard page, everything works fine.

To be clear, public dashboards cannot refresh queries. All they do is fetch the latest cached result from the metadata db.

So you mean if users want to play with the parameters on the public dashboard, we have to play with all the parameters on the ReDash dashboard page first to make some cache there. And then when they change parameters on the public dashboard the viz will load properly since it can fetch the cache in metadata db. Am I right?

Pretty much. This was improved in V10 somewhat so that all but text parameters are considered safe. But overall this isn’t a use-case we support very well. If you want people to execute queries they need to be logged-in. Redash isn’t built for embedded analytics.

Hmmm…I just had a quick try. Like on the ReDash dashboard page I set my parameter to a certain value and it works properly as usual, and then on the public dashboard I put the exact same parameter, the viz still loads forever…Probably need to upgrade to V10 as you mentioned it has better support. Can you show me a tutorial about upgrading? We already have many queries and dashboards there, just afraid of losing some data.