Page MenuHomePhabricator

JS Cannot read property 'find' of undefined on Beta cluster
Closed, ResolvedPublic

Description

On page https://en.m.wikipedia.beta.wmflabs.org/wiki/Qatar we see the following error:

VM94 mobile.init.js:1 Uncaught TypeError: Cannot read property 'find' of undefined
    at VM94 mobile.init.js:1
    at j (VM94 mobile.init.js:1)
    at e.exports (VM94 mobile.init.js:1)
    at Object../src/mobile.init/mobile.init.js (VM94 mobile.init.js:1)
    at f (VM38 load.php:9072)
    at t (VM38 load.php:9072)
    at Array.r [as push] (VM38 load.php:9072)
    at VM94 mobile.init.js:1
(anonymous) @ VM94 mobile.init.js:1
j @ VM94 mobile.init.js:1
e.exports @ VM94 mobile.init.js:1
./src/mobile.init/mobile.init.js @ VM94 mobile.init.js:1
f @ VM38 load.php:9072
t @ VM38 load.php:9072
r @ VM38 load.php:9072
(anonymous) @ VM94 mobile.init.js:1

This occurs on page load. The impact of this is that the header icons do not work. Different articles like https://en.m.wikipedia.beta.wmflabs.org/wiki/Dog work just fine. The Qatar page on production works fine.

OS: macOS Mojave
Browser: Chrome Version 75.0.3770.100 (Official Build) (64-bit)
Device: MBP
Emulated Device: iPhoneX

QA Results

ACStatusDetails
1T228298#5343816
2T228298#5343816

Event Timeline

Jdlrobson added a subscriber: Jdlrobson.

IS this still a problem (there was a related issue fixed? Pulling it to sprint as this is probably a recent regression.

pmiazga added a subscriber: pmiazga.
Jdlrobson raised the priority of this task from High to Unbreak Now!.Jul 17 2019, 7:47 PM

Reproduced when anonymous. Problematic code is:

currentPage.$el.find( '.mw-editsection' ).hide();

Change 524005 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] 🐛 Bug: Fix Cannot read property 'find' of undefined error

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

Change 524005 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] 🐛 Bug: Fix Cannot read property 'find' of undefined error

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

nray added a subscriber: nray.

@Edtadros this should be fixed now if you check the page again. Thanks for noticing this and bringing it up!

Jdlrobson lowered the priority of this task from Unbreak Now! to High.Jul 17 2019, 9:28 PM

Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX

Test Artifact(s):

QA Steps

✅ AC1: Navigate to https://en.m.wikipedia.beta.wmflabs.org/wiki/Qatar. This error should not appear in the console: TypeError: Cannot read property 'find' of undefined.

✅ AC2: Header buttons should work.

About System - Edited.gif (1×750 px, 2 MB)