-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
commons.bundle.js:3 Uncaught (in promise) TypeError: Cannot read property 'type' of undefined #43189
Comments
Pinging @elastic/kibana-app-arch |
Copying this information from the original issue (not a solution, just summary of a debugging session): @stacey-gammon @lukeelmers I debugged the issue, thinking this was a filter_manager issue, because the error is coming from filter manager (map_pharses). However, the dashboard shouldn't have filters at all (it doesn't have them in 7.2). The problem happens when in 7.3, this dashboard decides it has a filter and then adds a misshaped one to I didn't figure out yet why the dashboard thought it had a filter though. |
So I think this does actually have to do with the migration changes. In 7.3 I added migrations so I could get rid of some in place, ad hoc migration logic. This change was not 1:1. So, in 7.2 we have this logic when creating filter objects from the saved object:
The original migration logic closely mimicked this, but then we hit the bug with certain filters that didn't have
So actually that type error in the console only showed up once I fixed the original bug in that first issue! The original code in 7.2 had its own problems because it would still improperly detect a query filter, just like the original migration code did. I'm going to guess dashboard handled that improper query string filter okay, but migrations didn't. So when we found that the dashboard saved object in 7.2 and the dashboard saved object in 7.3 looked the same, this is actually wrong. In 7.3 we should just throw that empty filter out. The logic should be something like:
So I think the fix is to change migrations to remove filters that don't have a meta property, or once again put that logic back in the code. |
What might need more investigation is how this is handled with the new async filter updates. e.g. what happens if someone manually modifies the URL to include the bad filters? Will |
I tested the URL situation and you can hit the bug that way because the So we should actually be good re: URLs. If they manually modify the URL, we don't make any promises on it working. Though, it would be really great if we had our migration system somehow hooked up to URLs too. |
Splitting out the errors in #41240
Kibana version: 7.3.0 BC4
Elasticsearch version: 7.3.0 BC4
Steps to reproduce:
machine_os horizontal_bard_chart response_code
with logstash index patternbubbles.json.txt
Errors in browser console (if relevant):
The text was updated successfully, but these errors were encountered: