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

Unable to use view chart in explore feature on 1.4.0 #18198

Closed
iercan opened this issue Jan 27, 2022 · 17 comments · Fixed by #18181
Closed

Unable to use view chart in explore feature on 1.4.0 #18198

iercan opened this issue Jan 27, 2022 · 17 comments · Fixed by #18181
Labels
#bug Bug report v1.4 validation:required A committer should validate the issue

Comments

@iercan
Copy link
Contributor

iercan commented Jan 27, 2022

After upgrading to 1.4.0, we are unable to use view chart in explore feature for some charts. When I try to open in explore, I'm getting a blank chart as seen in the picture.

Only thing I detected common between these charts is that they all have ../superset/explore/?URL_IS_TOO_LONG_TO_SHARE&... in their urls. Maybe something wrong with url conversion?

How to reproduce the bug

Try to open chart in explore

Expected results

Charts need to be opened in explore mode

Actual results

Getting blank chart

Screenshots

Screenshot from 2022-01-27 16-22-29

image

Environment

  • browser type and version: Chrome 97
  • superset version: 1.4.0 installed with official docker image.
@iercan iercan added the #bug Bug report label Jan 27, 2022
@srinify
Copy link
Contributor

srinify commented Jan 27, 2022

Hi @iercan how do you suggest someone replicate this? For example -- should someone setup Superset in 1.3, make a time series chart, then upgrade and try to recreate this?

@srinify srinify added the validation:required A committer should validate the issue label Jan 27, 2022
@iercan
Copy link
Contributor Author

iercan commented Jan 27, 2022

@srinify Unfortunately I'm not sure how to replicate it. I'm just suspecting URL_IS_TOO_LONG_TO_SHARE conversion. We were using 1.3.2 for long time and never encountered this. I'm almost sure it happened after 1.4.0 upgrade.

@villebro
Copy link
Member

@iercan you appear to be running into a long standing problem in Superset which @michael-s-molina has been hard at work to solve once and for all. Here's the PR that should fix this problem for good: #18181. Not sure what's causing the URL to overflow in 1.4 compared to 1.3, but can you check how big the chart metadata blob is?

@fritzb
Copy link

fritzb commented Jan 27, 2022

We also noticed the same issue. I noticed, it happened on all large size dashboard, and our large dashboard are with tabs. Small dashboard without tabs seemed to be okay.

@iercan
Copy link
Contributor Author

iercan commented Jan 28, 2022

can you check how big the chart metadata blob is?

@villebro Sorry I don't know how to get this information, can you explain it?

@villebro
Copy link
Member

@iercan you can do the following:

  1. Go to the "Charts" page and hover over the chart in question. You'll see a link similar to this: http://localhost:9000/superset/explore/?form_data=%7B%22slice_id%22%3A%20747%7D. For this chart the chart id is 747
  2. Go to the following url, replacing 747 with the chart id: http://localhost:9000/chart/edit/747
  3. Here you'll see the "Parameters" secion which contains the chart metadata

One question: does the error only come up when you go from the Dashboard page and click on "View chart in Explore", or does it also happen when going to Explore from the "Charts" page?

@iercan
Copy link
Contributor Author

iercan commented Jan 28, 2022

It happens only from dashboard page. Charts menu works fine. If I click it from charts menu I don't see URL_IS_TOO_LONG_TO_SHARE keyword in the url which kinda validate my suspects right?

I saved metadata to a file and it seems 77 line and about 3kB.

@villebro
Copy link
Member

My initial hunch is that these cherries would be needed: #16621 and #17123. But it appears they're already included in 1.4.0. So maybe there's yet another cherry that's needed. @iercan and @fritzb can one of you copy the link from the "View chart in Explore" menu item and post it here so we can see what additional metadata the URL contains?

image

@iercan
Copy link
Contributor Author

iercan commented Jan 28, 2022

This is the url before I click. (I decoded them for easy read)

https://superset.mydomain.com/superset/explore/?URL_IS_TOO_LONG_TO_SHARE&form_data={"datasource":"129__table","viz_type":"echarts_area"}

and this is converted url after I click

https://superset.mydomain.com/superset/explore/?form_data={"viz_type":"echarts_area","datasource":"129__table","time_range_endpoints":["inclusive","exclusive"],"granularity_sqla":"__time","time_grain_sqla":"P1D","time_range":"No filter","groupby":[],"adhoc_filters":[],"order_desc":true,"row_limit":10000,"comparison_type":"values","annotation_layers":[],"forecastPeriods":10,"forecastInterval":0.8,"x_axis_title_margin":15,"y_axis_title_margin":15,"y_axis_title_position":"Left","color_scheme":"supersetColors","seriesType":"line","opacity":0.2,"only_total":true,"markerSize":6,"legendType":"scroll","legendOrientation":"top","x_axis_time_format":"smart_date","rich_tooltip":true,"tooltipTimeFormat":"smart_date","y_axis_format":"SMART_NUMBER","truncateYAxis":true,"y_axis_bounds":[null,null],"extra_form_data":{}}

@villebro
Copy link
Member

I tried to repro on 1.4.0, but I don't have any massive enough dashboards that would cause this. Out of curiosity, do you have a lot of different labels on the problematic dashboard? That's the main thing I can think of that might bloat the URL..

@iercan
Copy link
Contributor Author

iercan commented Jan 28, 2022

Dashboard I get this error is not so big actually. Here is some characteristics of it if helps.

  • There is 9 native filters. 2 of them is nested. And 2 of them have another scopes.
  • There is 3 tab in the dashboard. First one have 10 charts, second one have 5 charts and last one have just 1 charts.
  • There is 2 different dataset. Charts that have this problem shares same dataset. I also checked another dashboard that use same dataset and saw they don't have this problem.
  • There is some predefined filter in the charts. I also tried to remove them but result didn't change.

I also forgot to send a working url sample of a chart If I open it from Charts menu.

https://superset.mydomain.com/superset/explore/?form_data={"viz_type":"echarts_area","datasource":"129__table","slice_id":1151,"time_range_endpoints":["inclusive","exclusive"],"granularity_sqla":"__time","time_grain_sqla":"PT5M","time_range":"Last+day","metrics":["total_user"],"groupby":[],"adhoc_filters":[{"clause":"WHERE","comparator":"0","expressionType":"SIMPLE","filterOptionName":"filter_2hk7pthcti9_4t133u8ju3w","isExtra":false,"isNew":false,"operator":"!=","operatorId":"NOT_EQUALS","sqlExpression":null,"subject":"integer_userId"},{"clause":"WHERE","comparator":"0","expressionType":"SIMPLE","filterOptionName":"filter_svpaf2824g_6azb3l7o3de","isExtra":false,"isNew":false,"operator":">","operatorId":"GREATER_THAN","sqlExpression":null,"subject":"integer_pageView"}],"limit":null,"timeseries_limit_metric":[],"order_desc":true,"row_limit":null,"rolling_type":null,"time_compare":["1+day+ago","1+week+ago"],"comparison_type":"values","annotation_layers":[],"forecastPeriods":10,"forecastInterval":0.8,"x_axis_title_margin":15,"y_axis_title_margin":15,"y_axis_title_position":"Left","color_scheme":"googleCategory10c","seriesType":"line","opacity":0.2,"only_total":true,"markerSize":6,"show_legend":true,"legendType":"scroll","legendOrientation":"top","x_axis_time_format":"smart_date","rich_tooltip":true,"tooltipTimeFormat":"smart_date","y_axis_format":"SMART_NUMBER","truncateYAxis":true,"y_axis_bounds":[null,null],"extra_form_data":{}}

@villebro
Copy link
Member

villebro commented Feb 2, 2022

@iercan and @fritzb are either of you able to help trying to debug this issue using a slightly modified build of 1.4? I can open a branch with a small code change that will print out some info that should show what's causing this problem.

@iercan
Copy link
Contributor Author

iercan commented Feb 2, 2022

@villebro We are using official docker image to deploy and we also have another deployment for debug purpose. I can test easily if you can provide me a docker image.

@villebro
Copy link
Member

villebro commented Feb 2, 2022

Ok I'll see if I can make one

@iercan
Copy link
Contributor Author

iercan commented Feb 14, 2022

Problem still exists on 1.4.1

@villebro villebro added the v1.4 label Feb 16, 2022
@villebro
Copy link
Member

villebro commented Apr 5, 2022

FYI: This issue is solved in the forthcoming 1.5.0 release.

@iercan
Copy link
Contributor Author

iercan commented Apr 16, 2022

I've tested 1.5.0rc3. It seems resolved. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report v1.4 validation:required A committer should validate the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants