apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.73k stars 13.85k forks source link

SQL LAB- Unexpected error #30665

Open zeedevio opened 3 weeks ago

zeedevio commented 3 weeks ago

Bug description

I have an error on everything related to queries. I'm unable to open query editor.

Error is located in new query editor Action for line


    const dbIds = Object.values(databases).map(database => database.id);

Screenshots/recordings

Screenshot 2024-10-21 at 17 29 21 Screenshot 2024-10-21 at 17 29 34 Screenshot 2024-10-21 at 17 32 35 Screenshot 2024-10-21 at 17 32 46

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

dosubot[bot] commented 3 weeks ago

I found a similar closed issue that might be relevant to the error you're encountering: SQL LAB - unexpected error. The suggested solution for this issue was to run the following commands after restarting the service:

export FLASK_APP=superset
superset db upgrade
superset init

This solution was confirmed to completely fix the issue [1].

Additionally, the "TypeError: Cannot convert undefined or null to object" error you're seeing in sqlLab.js might be related to how objects are being handled in the code. This type of error typically occurs when trying to access or manipulate properties of an undefined or null object. You might want to check the code around line 558 in sqlLab.js to ensure that all objects are properly initialized before use.

If the error persists, consider reviewing the logic that constructs objects using spread syntax, as shown in your code snippet, to ensure that all necessary properties are defined and available.

To continue talking to Dosu, mention @dosu.