Page MenuHomePhabricator

Error in HelpPanel workflow: Cannot read properties of null (reading 'context') in AddImageMobileArticle_target
Open, MediumPublic4 Estimated Story PointsBUG REPORT

Description

Error was present in wmf30 but increased by a large magnitude in wmf.1 to close to UBN levels (6880 errors in last 7 days - presumably relating to a deploy?). Please note it is getting close to a rate we would consider blocking the train for so should likely be fixed before any further roll outs. https://wikitech.wikimedia.org/wiki/Deployments/Holding_the_train#Error-rate_increases_(See_#Logspam).

e.g. https://logstash.wikimedia.org/app/dashboards#/doc/logstash-*/logstash-default-1-7.0.0-1-2023.10.27?id=0WU8cosBhro2teuGReau

The error appears in various forms, but all stack traces point to GrowthExperiments Help panel.

	at eval  https://en.m.wikipedia.org/w/load.php?lang=en&modules=ext.growthExperiments.HelpPanel&skin=minerva&version=nodc4:4:962
at Object.fire  https://en.m.wikipedia.org/w/load.php?lang=en&modules=mediawiki.base&skin=minerva&version=nrkdt:4:699
at ve.init.mw.Article_target.surfaceReady  https://en.m.wikipedia.org/w/load.php?lang=en&modules=ext.visualEditor.article_target%2Cbase%2Ccore%2Cdiffing%2CeditCheck%2Cicons%2Clanguage%2Cmediawiki%2CmobileArticle_target%2Cmwalienextension%2Cmwcore%2Cmwextensions%2Cmwformatting%2Cmwgallery%2Cmwimage%2Cmwlanguage%2Cmwlink%2Cmwmeta%2Cmwsave%2Cmwsignature%2Cmwtransclusion%2Csanitize%2CsupportCheck%2Cswitching%2Cwelcome%7Cext.visualEditor.core.mobile%2Cutils%7Cext.visualEditor.mwimage.core&skin=minerva&version=1ssd6:10:461
at ve.init.mw.MobileArticle_target.surfaceReady  https://en.m.wikipedia.org/w/load.php?lang=en&modules=ext.visualEditor.article_target%2Cbase%2Ccore%2Cdiffing%2CeditCheck%2Cicons%2Clanguage%2Cmediawiki%2CmobileArticle_target%2Cmwalienextension%2Cmwcore%2Cmwextensions%2Cmwformatting%2Cmwgallery%2Cmwimage%2Cmwlanguage%2Cmwlink%2Cmwmeta%2Cmwsave%2Cmwsignature%2Cmwtransclusion%2Csanitize%2CsupportCheck%2Cswitching%2Cwelcome%7Cext.visualEditor.core.mobile%2Cutils%7Cext.visualEditor.mwimage.core&skin=minerva&version=1ssd6:1271:894
at https://en.m.wikipedia.org/w/load.php?lang=en&modules=ext.visualEditor.article_target%2Cbase%2Ccore%2Cdiffing%2CeditCheck%2Cicons%2Clanguage%2Cmediawiki%2CmobileArticle_target%2Cmwalienextension%2Cmwcore%2Cmwextensions%2Cmwformatting%2Cmwgallery%2Cmwimage%2Cmwlanguage%2Cmwlink%2Cmwmeta%2Cmwsave%2Cmwsignature%2Cmwtransclusion%2Csanitize%2CsupportCheck%2Cswitching%2Cwelcome%7Cext.visualEditor.core.mobile%2Cutils%7Cext.visualEditor.mwimage.core&skin=minerva&version=1ssd6:1261:181

Alternative stack trace (at lower rate):

at onContextResize  https://th.m.wikipedia.org/w/load.php?lang=th&modules=ext.growthExperiments.HelpPanel&skin=minerva&version=1r78k:4:738
at later  https://th.m.wikipedia.org/w/load.php?lang=th&modules=oojs-ui-core%2Coojs-ui-widgets&skin=minerva&version=gt6lb:3:152

And

at eval  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.growthExperiments.HelpPanel&skin=minerva&version=axojv:4:962
at Object.fire  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=mediawiki.base&skin=minerva&version=1uehh:4:699
at AddLinkMobileArticle_target.ve.init.mw.Article_target.surfaceReady  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.visualEditor.article_target&skin=minerva&version=o94fy:10:461
at AddLinkMobileArticle_target.ve.init.mw.MobileArticle_target.surfaceReady  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.visualEditor.mobileArticle_target&skin=minerva&version=1h30k:5:894
at AddLinkMobileArticle_target.StructuredTaskArticle_target.surfaceReady  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.growthExperiments.StructuredTask&skin=minerva&version=gu6aw:25:363
at eval  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.visualEditor.mediawiki&skin=minerva&version=omya8:24:181

and

at eval  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.growthExperiments.HelpPanel&skin=minerva&version=axojv:4:962
at Object.fire  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=mediawiki.base&skin=minerva&version=1uehh:4:699
at AddImageMobileArticle_target.ve.init.mw.Article_target.surfaceReady  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.visualEditor.article_target&skin=minerva&version=o94fy:10:461
at AddImageMobileArticle_target.ve.init.mw.MobileArticle_target.surfaceReady  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.visualEditor.mobileArticle_target&skin=minerva&version=1h30k:5:894
at AddImageMobileArticle_target.StructuredTaskArticle_target.surfaceReady  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.growthExperiments.StructuredTask&skin=minerva&version=gu6aw:25:363
at eval  https://fa.m.wikipedia.org/w/load.php?lang=fa&modules=ext.visualEditor.mediawiki&skin=minerva&version=omya8:24:181

Event Timeline

Restricted Application added subscribers: Masumrezarock100, Aklapper. · View Herald Transcript

Checked few different errors related to ext.growthExperiments.HelpPanel - logstash link.

TypeError: Cannot read properties of null (reading 'context')
TypeError: Cannot read properties of null (reading 'surface')
TypeError: Cannot read property 'surface' of null
TypeError: Cannot read property 'context' of null
TypeError: Cannot read properties of undefined (reading '$element')
TypeError: window.ve.init._target.surface is null

So far, I did not notice any users' impact.

KStoller-WMF set the point value for this task to 4.Oct 31 2023, 4:22 PM

FTR, this can be reliably reproduced when Add Image Suggested edits is being submitted.

Checked the logstash link from https://phabricator.wikimedia.org/T349933#9288365 - there are 410 errors in 24 hours.

I wasn't able to trigger the error in beta (testwiki doesn't have image suggestions). I tried minerva skin with slow connection - adding, rejecting, and skipping images seem to be fine.

FTR, this can be reliably reproduced when Add Image Suggested edits is being submitted.

I haven't been able to reproduce it reliably with Add Image submissions or any other mechanism. I was able to reproduce it somehow reliably in production wikis. There was a clear drop on the rate after the the 15th December deployment, probably because of 978117. However it seems the editor surface is still null on mobile in some cases, no idea why :/

KStoller-WMF lowered the priority of this task from High to Medium.Mar 19 2024, 2:42 PM
  NODES
Idea 1
idea 1
Note 2
Project 12
USERS 1