-
Notifications
You must be signed in to change notification settings - Fork 40
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
[BUG] On demand reports fail to generate a CSV file for download. #371
Comments
Some further debugging: I traced it down to this line in return esb.sort(element[0], element[1]); The error happens when |
Update: it looks like after the upgrade, for some types of sorts with saved searches, the |
A "just fix this" solution, the following will reset the sort information for all saved searches, which will stop the errors. From there, they can be re-saved from the UI with new sort information. In local testing I wasn't able to get the search to fix itself once corrupted using only the UI, but either fixing the sort field per-report or resetting everything worked fine.
There probably exists a more elaborate painless script that can fix all the reports non-destructively (if not nested -> nest, if empty -> keep empty, if already nested -> don't nest). If I had more time on-hand I'd try to write it. Note re-saving with a new sort will cause both: |
Wrote #458 as a partial fix, but the root cause is still unknown |
What is the bug?
After updating to v 2.13, we're having some of our reports fail to generate. It's not every report, but it is consistent. That is, if a query fails to allow a csv to be generated it will always fail, and if one succeeds it will always succeed. The only error message in the console is a 500 with the message of:
"The 'order' parameter should be one of 'asc' or 'desc'".
This seems to indicate that there is an Order enum that isn't being properly declared, but I don't know where in the codebase that is. There is a "Sort" query string parameter being passed into the generate-report call that may be related.
How can one reproduce the bug?
Steps to reproduce the behavior:
What is the expected behavior?
CSV file is generated and downloaded.
What is your host/environment?
Do you have any screenshots?

Do you have any additional context?
I think I've traced it down to a bad querystring being built/supplied in context_menu.js:
dashboards-reporting/public/components/context_menu/context_menu.js
Line 177 in 985e623
But that code hasn't changed in years (aside from the addition of the xlsx support a bit above it.)
The text was updated successfully, but these errors were encountered: