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

cannot view Dashboards or Charts After Overriding SECRET_KEY with new value. #18785

Closed
3 tasks
aryeh98 opened this issue Feb 17, 2022 · 1 comment
Closed
3 tasks
Labels
#bug Bug report install:config Installation - Configuration settings install

Comments

@aryeh98
Copy link

aryeh98 commented Feb 17, 2022

After updating my SECRET_KEY value and changing it from its default value,When I try to navigate to see the a dashboard or a chart,I get an error. It seems like superset isnt fetching any of the data

How to reproduce the bug

1)Update SECRET_KEY value
2) Run superset in DEV mode

Expected results

Superset will fetch all the charts and dashboards, and Once I click on one of the dashboards or charts ,It will route me to them

Actual results

When I click on a dashboard, it routes me to the dashboard page but it just shows an error message: Unexpected error
When I click on a chart it takes me to a blank page with an error message:

{"errors": [{"message": "(sqlite3.OperationalError) no such column: slices.is_managed_externally\n[SQL: SELECT slices.uuid AS slices_uuid, slices.created_on AS slices_created_on, slices.changed_on AS slices_changed_on, slices.id AS slices_id, slices.slice_name AS slices_slice_name, slices.datasource_id AS slices_datasource_id, slices.datasource_type AS slices_datasource_type, slices.datasource_name AS slices_datasource_name, slices.viz_type AS slices_viz_type, slices.params AS slices_params, slices.query_context AS slices_query_context, slices.description AS slices_description, slices.cache_timeout AS slices_cache_timeout, slices.perm AS slices_perm, slices.schema_perm AS slices_schema_perm, slices.last_saved_at AS slices_last_saved_at, slices.last_saved_by_fk AS slices_last_saved_by_fk, slices.certified_by AS slices_certified_by, slices.certification_details AS slices_certification_details, slices.is_managed_externally AS slices_is_managed_externally, slices.external_url AS slices_external_url, slices.created_by_fk AS slices_created_by_fk, slices.changed_by_fk AS slices_changed_by_fk \nFROM slices \nWHERE slices.id = ?]\n[parameters: (130,)]\n(Background on this error at: http://sqlalche.me/e/13/e3q8)", "error_type": "GENERIC_BACKEND_ERROR", "level": "error", "extra": {"issue_codes": [{"code": 1011, "message": "Issue 1011 - Superset encountered an unexpected error."}]}}]}

Screenshots

superset-error-1

superset-error-2

Environment

(please complete the following information):

  • browser type and version:
  • superset version: Superset 0.0.0dev
  • python version: Python 3.8.10
  • node.js version: v16.13.1
  • any feature flags active:

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@aryeh98 aryeh98 added the #bug Bug report label Feb 17, 2022
@villebro
Copy link
Member

villebro commented Feb 22, 2022

Did you migrate the SECRET_KEY as instructed in UPDATING.md as per #17984?

Default Flask SECRET_KEY has changed for security reasons. You should always override with your own secret. Set PREVIOUS_SECRET_KEY (ex: PREVIOUS_SECRET_KEY = "\2\1thisismyscretkey\1\2\e\y\y\h") with your previous key and use superset re-encrypt-secrets to rotate you current secrets

In other words, adding this to your superset_config.py (the PREVIOUS_SECRET_KEY really is a literal string, not an example!):

PREVIOUS_SECRET_KEY = "\2\1thisismyscretkey\1\2\e\y\y\h" 
SECRET_KEY = "<my new secret key>"

and then running superset re-encrypt-secrets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report install:config Installation - Configuration settings install
Projects
None yet
Development

No branches or pull requests

2 participants