Skip to content
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

An error occurs when opening a public question with filters having default parameters #17033

Closed
kulyk opened this issue Jul 14, 2021 · 1 comment · Fixed by #17034 or #17042
Closed
Assignees
Labels
Embedding/Public Simple public iframe embeds Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Querying/Parameters & Variables Filter widgets, field filters, variables etc. .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Milestone

Comments

@kulyk
Copy link
Member

kulyk commented Jul 14, 2021

Describe the bug
When opening a public question that has filters with default values, the result is replaced with the "An error occurred while running the query" message in a couple of seconds.

NOTE: if you just refresh the page, it will work as expected

To Reproduce

  1. Enable public sharing in admin
  2. Ask a question > Native question > Sample Dataset
  3. Enter SELECT * FROM PEOPLE WHERE {{birthdate}} AND {{source}}
  4. Configure filters via the right sidebar:
    • {{ birthdate }} as a Field Filter mapped to People > BirthDate with a default of "Past 30 Years"
    • {{ source }} as a Field Filter mapped to People > Source with default a of "Affiliate"
  5. Save question
  6. In the bottom right corner, click the "Sharing" icon (an arrow)
  7. Open the share URL
  8. You can see a table with results for a couple of seconds, but then it's replaced with the "An error occurred while running the query" message

Demo

race-before.mov

Information about your Metabase Installation:
Metabase 0.40.0

@kulyk kulyk added Type:Bug Product defects Querying/Parameters & Variables Filter widgets, field filters, variables etc. .Needs Triage Embedding/Public Simple public iframe embeds .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. labels Jul 14, 2021
@kulyk kulyk self-assigned this Jul 14, 2021
@flamber flamber added Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness and removed .Needs Triage labels Jul 14, 2021
nemanjaglumac added a commit that referenced this issue Jul 14, 2021
@flamber
Copy link
Contributor

flamber commented Jul 14, 2021

This isn't a regression per-se. We have always loaded questions multiple times, but I think it might just be more likely to hit the race-condition now, since we fixed an issue (#7120) where default filters wasn't applied correctly to Public and Embedding before 0.40.0.

nemanjaglumac added a commit that referenced this issue Jul 14, 2021
@flamber flamber added this to the 0.40.1 milestone Jul 14, 2021
@nemanjaglumac nemanjaglumac added the .Reproduced Issues reproduced in test (usually Cypress) label Apr 1, 2022
This was referenced Mar 23, 2023
This was referenced May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Embedding/Public Simple public iframe embeds Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Querying/Parameters & Variables Filter widgets, field filters, variables etc. .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Projects
None yet
3 participants