Uncaught IndexSizeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0

I am getting an error when attempting to "Full Screen" individual Visualizations on my dashboards in Version 6.6. I've found several posts on this going back to 2018, any progress on a resolution would be most appreciated

This is coming from clicking the "Full Screen" under the three buttons at the top of the visualization in the dashboard

See error text below (domain name omitted)

Uncaught IndexSizeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. (https://:5601/dlls/vendors.bundle.dll.js:82)
Version: 6.6.0
Build: 19459
Error: Uncaught IndexSizeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. (https://:5601/dlls/vendors.bundle.dll.js:82)
at window.onerror (https://*****:5601/bundles/commons.bundle.js:3:935577)

Sorry to hear that. We are tracking this bug in the Kibana repository. That is the best place to receive updates on the resolution.

Thank you for the info. I developed a simple workaround that seems to resolve the issue, although it needs more test coverage. Also posted to the GitHub thread

This Error is coming from ./dlls/vendors.bundle.dll.js Line 149. The CanvasRenderingContext2D method getImageData() of the Canvas 2D API returns an ImageData object representing the underlying pixel data for a specified portion of the canvas.


The error is being caused by the sw and/or sh parameter values being passed as 0. This can be resolved by checking the values of sw and sh prior to passing them to the getImageData() method

  1. Search ./dlls/vendors.bundle.dll.js for
    var n=i.getImageData(0,0,this._width, this._height);return
  2. Make the following modification to this segment
    var imgWidth = ((this._width == 0) ? 500 : this._width); var imgHeight = ((this._height == 0) ? 500 : this._height); var n=i.getImageData(0,0,imgWidth, imgHeight);return
  3. Stop the Kibana process
  4. Delete the 'optimize' directory
  5. Restart the Kibana process

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.