Page MenuHomePhabricator

Uncaught TypeError: Cannot read property 'length' of null, TypeError: null is not an object (evaluating 'rects.length')
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: n/a

message
Uncaught TypeError: Cannot read property 'length' of null

Impact

Notes

Details

Request ID
AXQxc0pMNoG2jwpwrOQV
Request URL
https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.08.27/clienterror?id=AXQxc0pMNoG2jwpwrOQV&_g=h@05d81a8
Stack Trace
exception.trace
at VeUiFindAndReplaceDialog.ve.ui.FindAndReplaceDialog.renderRangeOfFragments  https://ca.wikipedia.org/w/load.php?lang=ca&modules=ext.visualEditor.articleTarget%2Cbase%2Ccore%2CdesktopArticleTarget%2CdesktopTarget%2Cdiffing%2Cicons%2Clanguage%2Cmediawiki%2Cmwalienextension%2Cmwcore%2Cmwextensions%2Cmwformatting%2Cmwgallery%2Cmwimage%2Cmwlanguage%2Cmwlink%2Cmwmeta%2Cmwsave%2Cmwsignature%2Cmwtransclusion%2Csanitize%2Cswitching%2Cwelcome%7Cext.visualEditor.core.desktop%2Cutils%7Cext.visualEditor.mwextensions.desktop%7Cext.visualEditor.mwimage.core&skin=vector&version=zd0la:822:690
at VeUiFindAndReplaceDialog.ve.ui.FindAndReplaceDialog.renderFragments  https://ca.wikipedia.org/w/load.php?lang=ca&modules=ext.visualEditor.articleTarget%2Cbase%2Ccore%2CdesktopArticleTarget%2CdesktopTarget%2Cdiffing%2Cicons%2Clanguage%2Cmediawiki%2Cmwalienextension%2Cmwcore%2Cmwextensions%2Cmwformatting%2Cmwgallery%2Cmwimage%2Cmwlanguage%2Cmwlink%2Cmwmeta%2Cmwsave%2Cmwsignature%2Cmwtransclusion%2Csanitize%2Cswitching%2Cwelcome%7Cext.visualEditor.core.desktop%2Cutils%7Cext.visualEditor.mwextensions.desktop%7Cext.visualEditor.mwimage.core&skin=vector&version=zd0la:821:843
at run  https://ca.wikipedia.org/w/load.php?lang=ca&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Csite&skin=vector&version=1pfn7:157:645

Event Timeline

Jdlrobson changed Request ID from undefined to fca6e1e9bbfb73b185cc6dd721ff0ca21bc8175eac2f097b86cf187fdc87618d.Aug 28 2020, 7:01 PM
Jdlrobson changed Request ID from fca6e1e9bbfb73b185cc6dd721ff0ca21bc8175eac2f097b86cf187fdc87618d to AXQxc0pMNoG2jwpwrOQV.
Jdlrobson changed Request URL from Various to https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.08.27/clienterror?id=AXQxc0pMNoG2jwpwrOQV&_g=h@05d81a8.

Change 623069 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] FindAndReplace: Guard against getSelectionRects failing

https://gerrit.wikimedia.org/r/623069

I couldn't reproduce this, but as the offending path tried to build a DOM range from a selection on a debounced event, I can see how that could result in the DOM range not being able to be constructed. Absent of reports of the dialog not behaving properly, I think it's fine to just give up if the rects can't be generated

Change 623069 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] FindAndReplace: Guard against getSelectionRects failing

https://gerrit.wikimedia.org/r/623069

As we couldn't reproduce this, there is nothing to test. Hopefully it will stop appearing in the error logs.

Change 623875 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (b49db9a5b)

https://gerrit.wikimedia.org/r/623875

Change 623875 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (9534694b4)

https://gerrit.wikimedia.org/r/623875

matmarex added a subscriber: matmarex.

These are probably all the same error (the error messages are different because they're generated by different browsers). The fix is only getting deployed this week, because there was no deployment train last week.

Change 626476 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] More direct fix for find-and-replace running after teardown issues

https://gerrit.wikimedia.org/r/626476

Change 626476 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] More direct fix for find-and-replace running after teardown issues

https://gerrit.wikimedia.org/r/626476

Change 626737 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (22a771930)

https://gerrit.wikimedia.org/r/626737

Change 626737 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (22a771930)

https://gerrit.wikimedia.org/r/626737

It looks like the "More direct fix" (https://gerrit.wikimedia.org/r/626476) regressed the issue.

At first the errors disappeared between 2020-09-09 and 2020-09-16 (corresponding to the first patch https://gerrit.wikimedia.org/r/623069), then reappeared (corresponding to https://gerrit.wikimedia.org/r/626476).

Chart for "rects is null": https://logstash.wikimedia.org/goto/91e5fcdf5bd39363519d06086f659b0e

image.png (1×2 px, 88 KB)

Chart for "Cannot read property 'length' of null": https://logstash.wikimedia.org/goto/5a0da0e3d8cf553a614442893d8145ff (there is more noise, there are probably other errors with the same message)
image.png (1×2 px, 93 KB)

Change 629214 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[VisualEditor/VisualEditor@master] Restore check for getSelectionRects returning null

https://gerrit.wikimedia.org/r/629214

Change 629214 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Restore check for getSelectionRects returning null

https://gerrit.wikimedia.org/r/629214

Change 629450 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (0a5e284c7)

https://gerrit.wikimedia.org/r/629450

Change 629450 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (0a5e284c7)

https://gerrit.wikimedia.org/r/629450

Jdlrobson renamed this task from Uncaught TypeError: Cannot read property 'length' of null to Uncaught TypeError: Cannot read property 'length' of null, TypeError: null is not an object (evaluating 'rects.length').Oct 9 2020, 7:34 PM

Stopped occurring after 13 October.

"rects.length": https://logstash.wikimedia.org/goto/d3fc8c9caa6ebeace47854fc2b397a0b

image.png (403×2 px, 45 KB)

"Cannot read property 'length' of null": https://logstash.wikimedia.org/goto/d7479784897998032da012bd44ae07f2
(the same error message can easily occur for unrelated problems, and it still appears, but at greatly reduced volume)

image.png (403×2 px, 49 KB)

"rects is null": https://logstash.wikimedia.org/goto/a68b172beab3d9751f336990a6b08986

image.png (403×2 px, 46 KB)