Page MenuHomePhabricator

Special:MobileOptions throwing JS error from mobile.watchstar in stable
Closed, ResolvedPublic

Description

When you go to http://en.m.wikipedia.org/w/index.php?title=Special:MobileOptions&mobileaction=stable while not logged in, it gives you the following JS error which seems to be thrown from the mobile.watchstar module:
TypeError: M.getCurrentPage is not a function

Event Timeline

kaldari raised the priority of this task from to Needs Triage.
kaldari updated the task description. (Show Details)
kaldari added a project: Web-Team-Backlog.
kaldari subscribed.

Error does not occur with debug=true. Possibly an undeclared RL dependency.

Cannot reproduce on Beta Labs or locally, even with older versions of MobileFrontend. RL dependencies seem to be correct for mobile.watchlist module.

Actually, I can reproduce on Beta Labs, but only in stable mode. Still can't reproduce locally.

kaldari set Security to None.

@kaldari I think that watchstar init.js was split recently, in there it is the TypeError: M.getCurrentPage is not a function that is being called, line 23.

It is weird because in the mobileoptions page mw.mobileFrontend.getCurrentPage() actually exists and works.

It has to be a RL dependencies problem with how mobile.watchstar.init is being included.

Pretty hard to debug since it is loaded via ajax and evaluated via eval...

I have a feeling that this bug is gone because load.php version in beta is 8 days old as you can see in the URL.

I can still reproduce the bug and the load.php is now from April 4.

Change 205455 had a related patch set uploaded (by Jdlrobson):
Don't pull in watchstar code

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

Change 205455 merged by jenkins-bot:
Don't pull in watchstar code

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

phuedx subscribed.

As I said on your patch, let's see if this fixes the bug as the bug is hard (impossible?) to reproduce locally.

@Jdlrobson: should we SWAT deploy your change?

Nope. It's difficult to reproduce locally and should only impact special pages where javascript is loaded at top of the page. It doesn't break any functionality.

I used to see this error consistently and now I don't. Resolved!