Chart.js: NS_ERROR_FAILURE in Firefox 105.0.1

Expected behavior

I am using react-chartjs-2 and graphs were rendering fine until last Firefox update to version 105.0.1. Using mozregression I have managed to narrow the version when rendering breaks, it works in 104.0.3 but not in 105.0

INFO: Narrowed integration regression window to [5f7f879c, 118aa10a] (2 builds) (~1 steps left)

The graph also loads fine in other browsers: I have tested it in Chrome and Edge.

Current behavior

The page including the graph is not loading. It returns NS_ERROR_FAILURE.

In my actual website, it does not fail every time but most of them, I have not been able to identify the reason. In the reproducible sample, it is always failing for me when reloading.

Reproducible sample

https://codesandbox.io/s/including-changing-units-in-ticks-forked-rj98p

Optional extra steps/info to reproduce

Click on load button.

Possible solution

No response

Context

I am using react-chartjs-2 version 3.0.5.

I have found this Firefox bug but it is not related to the latest version and it mentions hidden and display attributes, which I am not using.

I have also found this issue #4775 but it is old and it is mentioned as solved.

chart.js version

v3.5.1

Browser name and version

Firefox 105.0.1

Link to your project

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23

Most upvoted comments

And here comes more:

Here’s the ion-content + raw canvas .fillText also fails with such error. So probably it’s an issue with the Firefox itself, or Ionic, or Stencil, or DOM Custom Elements, and chart.js is affected, because it uses canvas and fillText

https://stackblitz.com/edit/angular-ivy-pyvhyk?file=src/app/pages/index/index.page.ts

  ngAfterViewInit() {
    const ctx = this.canva.nativeElement.getContext('2d');

    ctx.fillText('Hello, world', 10, 10);
  }

obraz

Alright, with the newest Ionic 6 it also happens:

https://stackblitz.com/edit/angular-ivy-hcqrgf?file=src/app/pages/index/index.page.html

obraz

But here is something I encounter in my project (but I use Ionic 5), so outside ion-content it works perfectly fine, but one I’m inside ion-content, the app crashes (in the stackblitz, the chart is being rendered, but the expection is thrown).