Skip to content

Unable to share saved SQL queries - user gets an error wen trying to load the query #31367

Closed

Description

@yousoph

Bug description

Description

Users are unable to share saved SQL queries to other users. The owner of a saved query can access it via the shared URL, but any other user attempting to access the same URL receives an error message: “The query couldn’t be loaded."

How to reproduce the bug

  1. Log in and save a query in SQL Lab.
  2. Copy the query URL using the "Copy Query URL" option.
  3. Share the URL with a different user.
  4. Have the other user try to load the shared query URL.
  5. Observe that the second user receives the error message: “The query couldn’t be loaded.”

Expected results

Any user with access to SQL Lab should be able to load and view saved SQL queries via a shared URL.

Actual results

Only the creator of the query can load the query from the shared URL. Other users receive an error message stating: "The query couldn’t be loaded."

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Activity

  1. geido commented on Dec 10, 2024

    @geido
    Member

    🎉 Preset Bounty Available: $250 USD 🎉

    To claim this bounty, please carefully follow the steps below.


    📋 Steps to Participate

    1. Review Guidelines:
      Read through the Preset Bounty Program Contribution Guide for complete details on bounty requirements.

    2. Show Your Interest:
      Complete the Preset Bounty Program Survey and comment this issue to express your interest.

    3. Join the Slack Channel:
      After completing the survey, you’ll receive an invitation to the dedicated Apache Superset Slack channel.

    4. Get Assigned:
      To officially start, ensure a Bounty Program Manager has assigned you to this issue.

    5. Submit Your Solution:
      When ready, submit your solution with the Fixes #{issue_number} notation in your Pull Request description.

    6. Claim Your Bounty:
      Sign up at GitPay.me and submit your solution via: https://gitpay.me/#/task/1013


    💡 Additional Notes

    • Only developers assigned by a Bounty Program Manager should start working on this issue to win the bounty.
    • Be sure to follow the guide closely to avoid any delays in payment. Please, allow a few days after your PR has been merged for the bounty to be released.

    Good luck, and happy coding! 🎉

  2. added
    preset:bounty
    preset:bounty:bug
    on Dec 10, 2024
  3. LevisNgigi commented on Dec 10, 2024

    @LevisNgigi
    Contributor

    Hey @geido I would love to work on this.

  4. lethehoa commented on Mar 10, 2025

    @lethehoa

    Got the problem The query couldn't be loaded in version 4.1.1, but I can't upgrade to the newest version now. Is there any way to fix this without upgrade?

  5. LevisNgigi commented on Mar 10, 2025

    @LevisNgigi
    Contributor

    Got the problem The query couldn't be loaded in version 4.1.1, but I can't upgrade to the newest version now. Is there any way to fix this without upgrade?

    Hey @lethehoa the fix is in v5.0.0 but I could help fix that for you if you do not want to upgrade.

  6. anjozma commented on May 8, 2025

    @anjozma

    Any plans to include this fix on v4.1.3?

  7. SandadiLokanathaReddy commented on May 14, 2025

    @SandadiLokanathaReddy

    hi @LevisNgigi , so upgrading to v5.0.0 is the only way to fix this issue or do we have any workaround or official fix for the v4.1.1?
    Thanks!

  8. LevisNgigi commented on May 14, 2025

    @LevisNgigi
    Contributor

    Hi @anjosma @SandadiLokanathaReddy as per my understanding the team does not backport features to minor releases so this will be available in v5.0.0 only.

  9. lethehoa commented on May 15, 2025

    @lethehoa

    Got the problem The query couldn't be loaded in version 4.1.1, but I can't upgrade to the newest version now. Is there any way to fix this without upgrade?

    Hey @lethehoa the fix is in v5.0.0 but I could help fix that for you if you do not want to upgrade.

    Hi @LevisNgigi, Yeah of course, please help me

  10. SandadiLokanathaReddy commented on May 15, 2025

    @SandadiLokanathaReddy

    Got the problem The query couldn't be loaded in version 4.1.1, but I can't upgrade to the newest version now. Is there any way to fix this without upgrade?

    Hey @lethehoa the fix is in v5.0.0 but I could help fix that for you if you do not want to upgrade.

    Hi @LevisNgigi, Yeah of course, please help me

    Yes, any help in fixing this issue within v4.1.1 is much appreciated because v5.x is still an rc it seems, means not yet production ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

preset:bountypreset:bounty:bugsqllab:saved_queries

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions