question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while changing data source in chart

See original GitHub issue

I am getting an error while changing data source in chart after selecting new data source

Expected results

Data source should get changed to chosen source.

Actual results

Message “An error occurred”

Screenshots

image

image

Environment

  • superset version: 0.30.0
  • python version: 3.6.9 `

Checklist

Make sure these boxes are checked 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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:31 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
iercancommented, Sep 13, 2020

I resolved issue by adding this to superset config

ENABLE_PROXY_FIX = True

and configuring nginx like this

   location / {
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

      proxy_set_header X-Forwarded-SSL on;
      proxy_set_header X-Forwarded-Proto https;

      proxy_set_header Host $http_host;
      proxy_set_header X-NginX-Proxy true;

      proxy_pass http://127.0.0.1:8088/;
      proxy_redirect off;

      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
    }

These lines do the trick proxy_set_header X-Forwarded-SSL on; proxy_set_header X-Forwarded-Proto https;

2reactions
czuecommented, Jul 8, 2020

I’m also experiencing this on 0.36.0. My issue appears related to this one https://github.com/apache/incubator-superset/issues/8686 in that I’m getting a JavaScript console error:

Unsafe attempt to load URL http://example.com/datasource/get/table/27/ from frame with URL https://example.com/superset/explore/?form_data=....#. Domains, protocols and ports must match.

However I have applied every workaround, including setting ENABLE_PROXY_FIX and PROXY_FIX_CONFIG in superset_config.py as well as validating the X-Forwarded-Proto and other headers are set and it doesn’t seem to resolve the issue.

I am running superset on HTTPS behind an nginx reverse proxy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while changing data source in chart · Issue #8686 - GitHub
I am getting an error while changing data source in chart after selecting new data source. Expected results. Data source should get changed ......
Read more >
Handling data source errors (Power Query) - Microsoft Support
Understanding Power Query errors​​ Queries rely on table and column names to shape data in almost every step. Avoid changing or removing original...
Read more >
Unable to change datasource in charts in Superset
In charts, there is an option to "change datasource" but when I click it gives an error "An error occurred". In production server...
Read more >
How to Troubleshoot and Fix Excel Pivot Table Errors
1) Locate Pivot Table Data Source · Select any cell in the pivot table. · On the Ribbon, click the PivotTable Analyze tab...
Read more >
Correcting the Source Reference not Valid Error in a Pivot Table
Check the Excel file name. If it contains any square brackets, rename the file and remove the brackets. Example: Below is an example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found