tejashu
December 17, 2024, 9:03am
1
Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch-2.18
OpenSearch Dashboards -2.18
Mac OS
Firefox browser
Describe the issue :
I am seeing a tooltip formatter error in the console of firefox browser from my MAC laptop in the opensearch-playground.
Could you please provide a solution for this?
Configuration :
Relevant Logs or Screenshots :
up!
Seems to be related:
opened 08:45AM - 09 Jul 25 UTC
bug
**Describe the bug**
A `TypeError: data.series.find is not a function` appears … in the browser console when hovering some visualizations (histogram) in Firefox.
<img width="1920" height="696" alt="Image" src="https://github.com/user-attachments/assets/e7aca7e3-73bb-4a9f-9ae5-5f255f35f8b4" />
<details>
<summary>Error</summary>
```
Uncaught TypeError: data.series.find is not a function
tooltipFormatter https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
fakeD3Bind https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
dispatch https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
handle https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
add https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
Se https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
each https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:394
visTypeVislib.chunk.2.js:1:61466
tooltipFormatter https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
fakeD3Bind https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
dispatch https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
handle https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
(Async: EventListener.handleEvent)
add https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
Se https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
each https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:394
each https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:394
Se https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
on https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:405
jqOn https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
fakeD3Bind https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
d3_selection_each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
call https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
addBars https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
draw https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
d3_selection_each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
draw https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
call https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
draw https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
at https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:491
ls https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:491
draw https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
d3_selection_each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
draw https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
call https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
d3_selection_each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
each https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.1.js:1
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
_runOnHandler https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.chunk.2.js:1
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.plugin.js:6
InterpretGeneratorResume self-hosted:1413
AsyncFunctionNext self-hosted:800
(Async: async)
render https://playground.opensearch.org/8487/bundles/plugin/visTypeVislib/visTypeVislib.plugin.js:6
visualization_chart_VisualizationChart/success$< https://playground.opensearch.org/8487/bundles/plugin/visualizations/visualizations.plugin.js:6
_next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:499
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
debouncedNext https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:499
re https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:499
_execute https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
execute https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
flush https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
(Async: setInterval handler)
requestAsyncId https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
schedule https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
schedule https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:351
schedule https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
_next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:499
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
_next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
_next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
_next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
startRenderVisualization https://playground.opensearch.org/8487/bundles/plugin/visualizations/visualizations.plugin.js:6
componentDidUpdate https://playground.opensearch.org/8487/bundles/plugin/visualizations/visualizations.plugin.js:6
ra https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
pl https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
unstable_runWithPriority https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:446
Ho https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
hl https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
Ja https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
o https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
unstable_runWithPriority https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:446
Ho https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
$o https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
Uo https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
Ya https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
Nl https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
jl https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
render https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:438
render https://playground.opensearch.org/8487/bundles/plugin/visualizations/visualizations.plugin.js:6
render_ExpressionRenderHandler https://playground.opensearch.org/8487/bundles/plugin/expressions/expressions.plugin.js:6
render https://playground.opensearch.org/8487/bundles/plugin/expressions/expressions.plugin.js:6
loader_ExpressionLoader https://playground.opensearch.org/8487/bundles/plugin/expressions/expressions.plugin.js:6
__tryOrUnsub https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
_next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
loader_ExpressionLoader https://playground.opensearch.org/8487/bundles/plugin/expressions/expressions.plugin.js:6
AsyncFunctionNext self-hosted:800
(Async: async)
update https://playground.opensearch.org/8487/bundles/plugin/expressions/expressions.plugin.js:6
updateHandler https://playground.opensearch.org/8487/bundles/plugin/visualizations/visualizations.plugin.js:6
AsyncFunctionNext self-hosted:800
(Async: async)
__tryOrUnsub https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
_next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:21
next https://playground.opensearch.org/8487/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:349
_autoRefreshIntervalId https://playground.opensearch.org/8487/bundles/plugin/data/data.plugin.js:1
```
</details>
This could be related to the variable `data.series` is not an array as expected. According to my research, this could be caused because the `data.series` variable should be assigned with the `__data__` property of the `svg` element that contains information about all the histogram series, but in Firefox, this is assigning other data structure where `data.series` could be a string instead.
The variable assignment, could be done here: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/3.0.0/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js#L243-L245. The `nearestViewportElement` accessor seems that could have been removed in later versions of Firefox to 109 to match the SVG 2.0 spec: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/109
The error is present in 3.0.0 and previous versions like as 2.19.1 that I tested.
The error causes the related tooltip is not displayed when hovering the visualization using Firefox browser.
Comparing with Chrome (126.0.6478.61), the tooltip is displayed correctly:
<img width="874" height="504" alt="Image" src="https://github.com/user-attachments/assets/d1ef4272-1979-4559-91d2-74b0f40315b6" />
**To Reproduce**
Steps to reproduce the behavior:
1. Using a histogram visualization in the Dashboards app, hover the graph
2. Review the browser console to see the error
**Expected behavior**
The tooltip in the histogram visualization should appear in the Firefox browser.
**OpenSearch Version**
3.0.0 and 2.19.1
**Dashboards Version**
3.0.0 and 2.19.1 (other could be affected too)
**Plugins**
None
**Screenshots**
<img width="1920" height="696" alt="Image" src="https://github.com/user-attachments/assets/e7aca7e3-73bb-4a9f-9ae5-5f255f35f8b4" />
**Host/Environment (please complete the following information):**
- Firefox 134.0b9 (64-bit)
**Additional context**
None.
From my perspective, this feature (tooltip) is broken, making the charts difficult to use in practice. The only available workaround is to use TSVB, but some things cannot be achieved with it (and vice versa).
This bug still exists in version 3.4.