Page MenuHomePhabricator

Merge blocker: TypeError: Cannot read property 'Infobar' of undefined
Closed, ResolvedPublic


Error: TypeError: Cannot read property 'Infobar' of undefined happening in the quibble-vendor-mysql-hhvm-docker job. For example

Happens every time. Other jobs pass. Doing a diff between this job and wmf-quibble-vendor-mysql-hhvm-docker the following extra extensions are present in the failing job (there are also extension not present, but that sounds less likely cause):


There also messages like Cannot read property 'Translation' of undefined\n at HTMLDivElement coming from jquery.wikibase.entitysearch that are not present in the successful job. That seems a lead... perhaps not the cause but symptom of a common cause, since Wikibase extension is present on both jobs.

Impact: Blocks merges to ContentTranslation

Event Timeline

Nikerabbit triaged this task as Unbreak Now! priority.Mar 29 2019, 6:49 PM

First failure I could find was at Mar 22, 2019, 22:19:49 UTC+02:00 and last passing before that was Mar 21, 2019, 20:19:41 UTC+02:00.

The output is not from QUnit, but from the browser console.

It is appearing close to jquery.wikibase.entitysearch from QUnit, but I don't think it is related to that. It's an unfortunate side effect from how the different programs all write to standard out at the same time.

 MobileFrontend TalkSectionOverlay.js - anonymous (logged out)
    ✔ …

DEBUG [middleware:source-files]: Requesting /extensions/ContentTranslation/tests/qunit/data/dm-translation-source-article.html

    ✔ Create & destroy

HeadlessChrome 72.0.3626 (Linux 0.0.0) ERROR
    "message": "
Uncaught TypeError: Cannot read property 'Translation' of undefined
   at http://localhost:9876/load.php?…
   at HTMLDivElement.<anonymous> (http:…

Note that it does not output any failed test from Wikibase. It simply shows no further output.

This means the exception is likely coming from the "next" test, which QUnit hasn't printed yet.

I believe this might be correlated to ContentTranslation:…/

testDataPath =  '/ContentTranslation/tests/qunit/data/dm-translation-source-article.html';

	QUnit.test( 'Source and target dom build test', function ( assert ) {
		var $fixture = $( '#qunit-fixture' ),
			done = assert.async();
		$fixture.load( testDataPath, function () {
			sourceDom =  )
			                   ^ undefined

As far as I can see the test has proper dependencies to should be defined (or some other failure would have had to be occured during loading and logged). It also hasn't changed in a while.

Infobar should exist in Would it be possible that something is overwriting Such as ArticlePlaceHolder in which is also one mentioned in my list above. Would the execution order matter?

I can reproduce the failure when ArticlePlaceholder is installed. Krinkle was also right about the failure. At that point only is defined.

This presumably started with rCICF53185ed59d05: Add ArticlePlaceholder to Wikibase Tests /

Zuul config for ContentTranslation installs Wikibase, which in turn, as of the above change, also installs ArticlePlaceholder.

Actually, no, it started with

That job passed because ContentTranslation commits install Wikibase+ArticlePlaceholder. But commits for ArticlePlaceholder do not install ContentTranslation.

Change 500112 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/ArticlePlaceholder@master] Fix broken sinon.stub use in createArticleTranslation.test.js

I'm taking a look at this from the WMDE side. Thanks both of you for digging into this.

Right now it looks to me like for fixing the stub should be enough.

It doesn't look to me like there was originally an intention in ArticlePlaceholder to require ContentTranslation but rather was always there as an optional dependency so I don't think we need to add ContentTranslation to always be loaded with the Article placeholder tests.

Change 500112 merged by jenkins-bot:
[mediawiki/extensions/ArticlePlaceholder@master] Fix broken sinon.stub use in createArticleTranslation.test.js

Krinkle claimed this task.
Krinkle added a project: Performance-Team.