Page MenuHomePhabricator

RangeError: Invalid array length / TypeError: datum.firstYear is undefined / Uncaught TypeError: Cannot read property 'value' of undefined / SyntaxError: Failed to execute 'addColorStop' on 'CanvasGradient': The value provided ('#NaNNaNNaN') could not be parsed as a color
Open, Stalled, LowPublic

Description

https://logstash.wikimedia.org/app/dashboards#/doc/logstash-*/logstash-2021.03.19?id=J6rjSngBWKe2MTdR9R9p

Observed on https://en.wikipedia.org/wiki/Internet#Social_impact

When dragging on the visualization in Firefox, I can trigger the error "TypeError: datum.firstYear is undefined"
In Chrome this appears as "Cannot read property 'value' of undefined".
The same graph seems to be associated with "RangeError: Invalid array length"

at Collector.proto.values  URL1:308:99
at Facetor.proto.changes  URL1:306:618
at Aggregate.prototype.transform  URL1:632:317
at Aggregate.prototype.evaluate  URL1:672:151
at Scale.dataRef  URL1:598:955
at Scale.domainMinMax  URL1:599:762
at Scale.quantitative  URL1:595:831
at Scale.scale  URL1:592:971
at fn  URL1:592:300

URL1: https://en.wikipedia.org/w/load.php?lang=en&modules=ext.graph.data%2Cvega2%7Cext.scribunto.logs%7Cjquery%7Cjquery.makeCollapsible%2Cthrottle-debounce%7Cmediawiki.page.gallery%7Cmediawiki.toc&skin=vector&version=pbe7f

Note this error is not being logged as much as it should be due to a bug in the instrumentation code (see T277902), and can be trigged multiple times, so is very dangerous left unfixed.

The same graph also shows the error:

SyntaxError: Failed to execute 'addColorStop' on 'CanvasGradient': The value provided ('#NaNNaNNaN') could not be parsed as a color.
at gradient  URL1:485:828
at color  URL1:485:586
at Object.fill  URL1:485:114
at CanvasRenderer.draw  URL1:479:585
at CanvasRenderer.prototype.draw  URL1:472:511
at CanvasRenderer.draw  URL1:475:406
at CanvasRenderer.prototype.draw  URL1:472:511
at CanvasRenderer.draw  URL1:475:566
at CanvasRenderer.prototype.draw  URL1:472:511
at CanvasRenderer.draw  URL1:475:406

URL1: https://en.wikipedia.org/w/load.php?lang=en&modules=ext.graph.vega2%7Cjquery&skin=vector&version=bh9hy

Event Timeline

@thcipriani let's keep an eye on this one. I'm tempted for it to block the next train or train after that. IT depends what we discover in T277902.

@Seddon could you take a look at this one? I imagine the template is at fault, but we should look to fix this in the graph extension through validating the data editors are passing it.

Jdlrobson renamed this task from RangeError: Invalid array length / TypeError: datum.firstYear is undefined / Uncaught TypeError: Cannot read property 'value' of undefined to RangeError: Invalid array length / TypeError: datum.firstYear is undefined / Uncaught TypeError: Cannot read property 'value' of undefined / SyntaxError: Failed to execute 'addColorStop' on 'CanvasGradient': The value provided ('#NaNNaNNaN') could not be parsed as a color.Mar 19 2021, 6:30 PM
Jdlrobson updated the task description. (Show Details)

After fix of T260542 I would assume this old production error cannot longer happen. Would be nice to get fresh stats from logs.

Jdlrobson changed the task status from Open to Stalled.Jun 8 2023, 2:45 PM

Most likely, but since graphs are disabled it's impossible to verify that so I'll set this to stalled in the mean time.