Kibana version: 7.0 snapshots
Elasticsearch version: 7.0 snapshots
Server OS version: Linux
Browser version: Chrome
Browser OS version: Master
Original install method (e.g. download page, yum, from source, etc.):
Snapshots
Describe the bug:
Error loading dashboard in non-default space
Steps to reproduce:
Install ES/Kibana
Load sample dashboards
Create another space, go to that space and load sample data
Try to load dashboard for that sample data
When loading visualization - the TypeError occurs and the visualization does not open
Uncaught (in promise) TypeError: Cannot read property 'create' of undefined
at DashboardPanelUi._callee$ (commons.bundle.js:4)
at tryCatch (vendors.bundle.dll.js:480)
at Generator.invoke [as _invoke] (vendors.bundle.dll.js:480)
at Generator.prototype.(anonymous function) [as next] (https://localhost:5601/built_assets/dlls/vendors.bundle.dll.js:480:448402)
at step (commons.bundle.js:4)
at commons.bundle.js:4
at new Promise (
at DashboardPanelUi.
at DashboardPanelUi.componentDidMount (commons.bundle.js:4)
at Hi (vendors.bundle.dll.js:217)

Pinging @elastic/kibana-app
@ppisljar @lukeelmers another candidate to validate for pre/post revert
Seems to be OK in the current 6.7.0-SNAPSHOT.
My steps;
space1role1 with read access to the default space and all access to space1space1 with roles role1 plus other roles that give read and view_meta_data access to the data including to be able to add kibana_sample_data*I'm also unable to reproduce this on master. Tested with both the traditional vis data loader and the new pipeline loader.
I added a functional test last week which should fail in this exact situation (assuming the test is doing its job, of course): #29459
I am still able to reproduce on latest master snapshot
I can reproduce on the cloud on 7.0 snapshot (2/6 - pre-BC)
https://54e8e2582ebc4862b454db235afae497.us-central1.gcp.foundit.no:9243
User: elastic / ojs2OQrLqe9AoraoTqIRh7Uh
Go to Raya Fratkina space and try to open any of the sample data dashboards.
Interesting. I'm at a little bit of a loss on this one; I'm currently running the following snapshots on my machine:
https://snapshots.elastic.co/downloads/kibana/kibana-7.0.0-SNAPSHOT-darwin-x86_64.tar.gz
https://snapshots.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-SNAPSHOT-darwin-x86_64.tar.gz
7.0 branch.yarn es snapshot to start ES (will pull from the snapshot link above)../bin/kibana to start kibana.Everything loads as expected for me. I can see the issue in the cloud instance that @rayafratkina posted, but that's the only place I've been able to reproduce. Do we know when that cloud instance was deployed? Maybe it was an older version of the 7.0.0 snapshot?
@liza-mae Is there any more direction you could provide on exactly how you are running kibana to reproduce this?
@lukeelmers can you try to load the sample data from default space first, then switch to non-default and load sample data. It should reproduce that way. Let me know. Thanks.
Thanks! That did the trick. I took some time to test this in more depth... here are my findings:
6.6 or 6.7, but it __is__ present on master (8.0), 7.x and 7.0.Add new "references" attribute to saved objects for relationships (#28199) (https://github.com/elastic/kibana/commit/1b0f595f01b3cff1d63a709d31df854c362e168d)@mikecote Any ideas what might be going on here? The stack trace originates around
saved_objects_client_provider.js:42 and saved_object.js:220
Pinging @elastic/kibana-platform
@lukeelmers It turns out the migrations I created mutate the data and when you try to add it in the system a second time, data is missing. Another way to reproduce this is to add sample data, remove it, add it again and you will notice dashboards don't load properly. I will create a PR to remove data mutations no later than tomorrow.
Ah, interesting. Thanks for the insight! Ping me if there鈥檚 anything I can do to help or test this out.
@lukeelmers I have assigned you as a reviewer for the PR that will solve this issue (#30475). Let me know if there's questions or issues with the fix.
Most helpful comment
I can reproduce on the cloud on 7.0 snapshot (2/6 - pre-BC)
https://54e8e2582ebc4862b454db235afae497.us-central1.gcp.foundit.no:9243
User: elastic / ojs2OQrLqe9AoraoTqIRh7Uh
Go to Raya Fratkina space and try to open any of the sample data dashboards.