Page MenuHomePhabricator

TypeError: Cannot read properties of null (reading 'getSelection')
Closed, DuplicatePublicPRODUCTION ERROR

Description

Starting 18th December, this error began causing error alerts.
In 1.46.0-wmf.7 417,782 errors and counting and 1.46.0-wmf.5 only 49.
https://logstash.wikimedia.org/goto/7e9df7b804458543177feac91917c6d9

Not much information but this stack trace and impacting all skins:

at ve.ce.SelectionManager.updateDeactivatedSelection  https://uk.wikipedia.org/w/load.php?lang=uk&modules=ext.visualEditor.base%2Ccore%2CeditCheck%2Cmwtransclusion&skin=vector-2022&version=1lboe:667:408
at https://uk.wikipedia.org/w/load.php?lang=uk&modules=ext.visualEditor.base%2Ccore%2CeditCheck%2Cmwtransclusion&skin=vector-2022&version=1lboe:723:811

Based on volume per users seems like it occurs more than once on a single page view. Haven't tried replicating yet.

Steps to replicate the issue (include links if applicable):

What happens?:

What should have happened instead?:

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptJan 6 2026, 5:15 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdlrobson-WMF triaged this task as Unbreak Now! priority.Jan 6 2026, 5:18 AM

11,452 errors in last 12hrs so this meets criteria of https://wikitech.wikimedia.org/wiki/Deployments/Holding_the_train
Since alerts are currently disabled because of this error I think we should fix this ASAP (ideally before new deployment roll out).

Thanks for the link

It's a production-error, but it's probably not worth an emergency backport -- it's from a setTimeout after a save has succeeded, a failed attempt to act on an already-destroyed editor surface, so it's basically log-spam that has no visible effect for a user who doesn't have debug tools turned on.

@DLynch can you confirm these are the same? If so could we backport that patch today so that the logs are clean for the next deploy (and we can see alerts during roll out)?

It does look like a duplicate, yes.

Change #1223698 had a related patch set uploaded (by Aarohisharma3; author: Aarohisharma3):

[VisualEditor/VisualEditor@master] SelectionManager: Fix TypeError when surface is destroyed

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

Change #1223698 abandoned by Aarohisharma3:

[VisualEditor/VisualEditor@master] SelectionManager: Fix TypeError when surface is destroyed

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