Kibana version: 7.7.0 BC9
Elasticsearch version: 7.7.0 BC9
Server OS version: darwin_x86_64
Browser version: chrome latest
Browser OS version: OS X
Original install method (e.g. download page, yum, from source, etc.): from staging
Describe the bug: If user clicks on a open dashboard using dashboard icon in side nav from discover, dashboard doesn't display any results.
Please note:
Steps to reproduce:
Expected behavior:
Kibana should handle state mangement better.
Screenshots (if relevant):

Pinging @elastic/kibana-app (Team:KibanaApp)
Pinging @elastic/kibana-app-arch (Team:AppArch)
cc @lukeelmers @LeeDr
I can see in the screenshot TSVB is rendering fine, this seems to be related to the search service. Maybe some pending tasks hanging from the discover search?
Seems like it isn't reproduced in master. But I was able to reproduce in 7.7 branch.
I thought that this commit could fix the issue in master, https://github.com/elastic/kibana/pull/63199, but putting it on top of 7.7 didn't fix the issue.
@Dosant we are testing 7.7.0 and not on master because this is release testing. Let me know if you need more answers or help. Thanks!
@bhavyarm can you share the network and console outputs from the browser?
Some updates after debugging together with @lizozom:
basic with sync search strategy turned on. (just disabled async search in code)map and vis which fires multiple search request, in example: bar chart with histogram agg. Removing one of those is fixing the dashboard.map. We didn't find another combination to reliably reproduce using just OSS types.cc @ppisljar
Reproduced this on BC10 on production cloud instance
We figured it out and have 2 candidate prs. Please find explanation in the pr description.
tldr: there is a chance that canceling a search could also trigger a cancelation of another search.
@lizozom, @ppisljar, @lukasolson, I guess we need to decide if we comfortable with rolling out Option 1? Otherwise Option 2 seems like a clear and to the point fix.
Because I don't know search infrastructure well, I personally feel more comfortable with Option 2
@LeeDr, I pulled your test into both prs https://github.com/elastic/kibana/pull/64964. Not sure if it was finished or if it needs more work
at this point for me option 2 is preferred, it fixes fetchSoon to behave correctly when 0ms is passed in (which we should do anyway) and also fixes this bug with a really small change. we should also merge this to master.
Merged: https://github.com/elastic/kibana/pull/64999 (Option2) into 7.7
Most helpful comment
at this point for me option 2 is preferred, it fixes fetchSoon to behave correctly when 0ms is passed in (which we should do anyway) and also fixes this bug with a really small change. we should also merge this to master.