Page MenuHomePhabricator

"Uncaught TypeError: Cannot read property 'parseDocument' of null" from mw.cx.dm.Translation.static.getSourceDom
Open, Needs TriagePublic

Description

Jenkins job for a commit in mediawiki/extensions/Echo, runs the shared gate where CX's unit test sometimes fails:

Uncaught TypeError: Cannot read property 'parseDocument' of null
 at mw.cx.dm.Translation.static.getSourceDom 
 at HTMLDivElement.<anonymous>
 at HTMLDivElement.<anonymous>
 at Function.each
 …
 at XMLHttpRequest.<anonymous>

This is briefly after the first passing test case from ext.cx.sitemapper which suggests it might be from a later test case in that test module.

Event Timeline

Krinkle created this task.Apr 7 2019, 11:24 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 7 2019, 11:24 PM

This seems to happen after https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/501634

The error is from this line in mw.cx.dm.Translation.static.getSourceDom method called from https://github.com/wikimedia/mediawiki-extensions-ContentTranslation/blob/master/tests/qunit/dm/mw.cx.dm.Translation.test.js#L23

		domDoc = ve.init.target.parseDocument( sourceHtml, 'visual' ),

Some tests, I assume from VE, is leaving ve.init.target global as null in such cases.

Codesearch shows only one file as setting init.target.

This is currently affecting merges in Echo and Flow. Consider disabling the test and investigating further afterwards.

Change 502373 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/ContentTranslation@master] tests: Disable flaky mw.cx.dm.Translation test

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

Change 502373 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] tests: Disable flaky mw.cx.dm.Translation test

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

mmodell changed the subtype of this task from "Task" to "Production Error".Wed, Aug 28, 11:07 PM