Page MenuHomePhabricator

Watchstar feature broken: Tapping the watchlist star while logged in results in "mobile-frontend-watchlist-error" popup message
Closed, ResolvedPublic

Description

I understand that https://gerrit.wikimedia.org/r/#/c/351549/ (the result of a debugging session with Firefox for Android on my personal phone) went live with Thursday's train deployment. But I'm still consistently encountering this error (even after a new login in incognito mode), and now also on Chrome. It happens both on an unwatched article (trying to watchlist it), and on a watched article (trying to unwatch it).

Two other users reported the same issue today at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Watchlist_error .

Event Timeline

Jdlrobson added a subscriber: Jdlrobson.

FYI It impacts me too now on both beta cluster and production. Anyone else in the team able to replicate this? Could be unbreak now.

{F8062970}I am also experiencing this same error message as documented above, using iPad Air 2 iOS 10.2.1. This "mobile-frontend-watchlist-error" message began roughly 2-3 days ago. When I switch to Desktop view on my iPad, I do not experience this problem when Adding a page to Watchlist.

Is there any resolution to the this bug, or any ideas on how to patch on my end, perhaps in Settings? FYI, I am currently using the Beta version.

FYI, I created a Help Desk ticket submitted to the Administrators involved with this project, see attached URL for Ticket.MarkHalsey

FYI It impacts me too now on both beta cluster and production. Anyone else in the team able to replicate this? Could be unbreak now.

I sent this ticket to the department that handles "Mobile-Frontend." Two help desk tickets can't hurt, especially since this ticket still appears Open.

{F8062970}I am also experiencing this same error message as documented above, using iPad Air 2 iOS 10.2.1. This "mobile-frontend-watchlist-error" message began roughly 2-3 days ago. When I switch to Desktop view on my iPad, I do not experience this problem when Adding a page to Watchlist.

Is there any resolution to the this bug, or any ideas on how to patch on my end, perhaps in Settings? FYI, I am currently using the Beta version.

Thanks for providing these additional details about the problem!

....

I sent this ticket to the department that handles "Mobile-Frontend." Two help desk tickets can't hurt, especially since this ticket still appears Open.

Actually duplicate tickets are not helpful, if anything they slow down rather than speed up the solution. The team that handles this code (Reading Web) is already aware of the issue, in particular @Jdlrobson who had already commented above.

Please also note that it's a weekend, i.e. the team (and myself) are officially off work right now.

FYI It impacts me too now on both beta cluster and production. Anyone else in the team able to replicate this? Could be unbreak now.

I sent this ticket to the department that handles "Mobile-Frontend." Two help desk tickets can't hurt, especially since this ticket still appears Open.

{F8062970}I am also experiencing this same error message as documented above, using iPad Air 2 iOS 10.2.1. This "mobile-frontend-watchlist-error" message began roughly 2-3 days ago. When I switch to Desktop view on my iPad, I do not experience this problem when Adding a page to Watchlist.

Is there any resolution to the this bug, or any ideas on how to patch on my end, perhaps in Settings? FYI, I am currently using the Beta version.

Thanks for providing these additional details about the problem!

....

I sent this ticket to the department that handles "Mobile-Frontend." Two help desk tickets can't hurt, especially since this ticket still appears Open.

Actually duplicate tickets are not helpful, if anything they slow down rather than speed up the solution. The team that handles this code (Reading Web) is already aware of the issue, in particular @Jdlrobson who had already commented above.

Please also note that it's a weekend, i.e. the team (and myself) are officially off work right now.

{F8062970}I am also experiencing this same error message as documented above, using iPad Air 2 iOS 10.2.1. This "mobile-frontend-watchlist-error" message began roughly 2-3 days ago. When I switch to Desktop view on my iPad, I do not experience this problem when Adding a page to Watchlist.

Is there any resolution to the this bug, or any ideas on how to patch on my end, perhaps in Settings? FYI, I am currently using the Beta version.

Thanks for providing these additional details about the problem!

....

I sent this ticket to the department that handles "Mobile-Frontend." Two help desk tickets can't hurt, especially since this ticket still appears Open.

Actually duplicate tickets are not helpful, if anything they slow down rather than speed up the solution. The team that handles this code (Reading Web) is already aware of the issue, in particular @Jdlrobson who had already commented above.

Please also note that it's a weekend, i.e. the team (and myself) are officially off work right now.

My apologies, I have never experienced a problem with Wiki before, so I don't know who the players are with regards to remedying Help Desk tickets. It appeared to me that this was more of a forum and appeared as Open, not resolved, so I just kind of figured out the process on my own. Sorry for any inconvenience I may have caused and appreciate the comments and the fact that I know this isn't a user specific issue. Warm Regards, Mark Halsey from San Diego.

Jdlrobson triaged this task as Unbreak Now! priority.May 15 2017, 9:29 AM

Urg. I can also reliably replicate this on master and beta cluster. I have no idea what happened here but let's look into this immediately.

Change 353843 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Revert "Use csrf token for watching"

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

Jdlrobson added a subscriber: greg.

@greg is there any chance we can SWAT this week in Vienna? Users cannot watch any pages in mobile which is bad. This only impacts logged in users.

Jdlrobson renamed this task from Tapping the watchlist star while logged in results in "mobile-frontend-watchlist-error" popup message to Watchstar feature broken: Tapping the watchlist star while logged in results in "mobile-frontend-watchlist-error" popup message.May 15 2017, 10:16 AM

Change 353843 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Revert "Use csrf token for watching"

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

@greg is there any chance we can SWAT this week in Vienna? Users cannot watch any pages in mobile which is bad. This only impacts logged in users.

SWATs are available/open this week during our team's offsite, but we won't be around during them (we're in our offsite during the EU afternoon one, and at dinner/asleep during the other two). Others can run the SWAT windows.

Change 353880 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@wmf/1.30.0-wmf.1] Revert "Use csrf token for watching"

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

Facepalm. Thought everything was off this week. I will stick around longer and SWAT later today then!

pmiazga added a subscriber: pmiazga.

@Jdlrobson - I'm assigning this task to you as you are going to SWAT it.

Change 353902 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/RelatedArticles@master] WIP: Webdriver CSS regression test

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

Change 353880 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@wmf/1.30.0-wmf.1] Revert "Use csrf token for watching"

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

@Tgr can you confirm csrf token's do not work with watch star? It's a little confusing how to use the tokens api as it gives a deprecated message. Any reason why Tilman might be getting an invalid token error when requesting a watch token? Is there anything permission specific that might be impacting that result?

Mentioned in SAL (#wikimedia-operations) [2017-05-15T18:45:16Z] <catrope@tin> Synchronized php-1.30.0-wmf.1/extensions/MobileFrontend/: Revert "Use csrf token for watching" (T165209) (duration: 00m 41s)

tested and looks good! thank you everybody for working on this so quickly! moving to QA for a double check. @ABorbaWMF - could you re-test around making sure all watchlist functionality looks good?

Per the watch API doc you need A "watch" token retrieved from action=query&meta=tokens. So the patch above was wrong.

action=tokens is deprecated in favor of action=query&meta=tokens (it says so on top of the help page). It should work though. And in any case postWithToken uses the non-deprecated one.

The API works fine for me:
https://en.m.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&meta=tokens&type=watch
https://en.m.wikipedia.org/wiki/Special:ApiSandbox#action=watch&format=json&titles=The+Magazine+of+Fantasy+%26+Science+Fiction&token=<token>

Yup it works fine for me too (now) but even after this is patch revert it doesnt for tilman on firefox mobile. A debug session showed an invalid token error... :/ I'm stumped to why.

Jdlrobson lowered the priority of this task from Unbreak Now! to High.May 16 2017, 10:23 AM
Jdlrobson removed a project: Patch-For-Review.

Fixed in production so dropping to high.

I did some testing using Nexus 5 and Galaxy Note 10.1. Browsers: Latest Chrome & Built in "Browser". Tapping "Star" icon both from Article page and search results

Tested on beta and everything looks ok. I tried a few different devices and browsers. Watchlist seems to be working normally.

Session loss, maybe?

For the record, @Jdlrobson and I had already excluded that possibility in the debugging session that gave rise to https://gerrit.wikimedia.org/r/#/c/351549/ (by logging out and logging in again, and logging in in a fresh Private Browsing session, with the error message persisting). That said, it works fine again for me now on said Firefox for Android browser.

In any case, if mere session loss routinely causes this error, we should replace it with a more explicit error message. How is this handled on desktop?

If the error is with the token specifically (and I have not verified that), then session loss is the most likely cause (since tokens are stored in the session). Feel free to ping me if you can reproduce the error and need help with debugging.

If the error is with the token specifically (and I have not verified that), then session loss is the most likely cause (since tokens are stored in the session).

Got it. How probable is session loss right after a fresh login?

Feel free to ping me if you can reproduce the error and need help with debugging.

Thanks, will do if I encounter it again! Just to clarify, the aforementioned debugging session had already involved @Jdlrobson physically connecting the phone to his laptop and running a debugging tool on it.

How probable is session loss right after a fresh login?

It shouldn't happen, but given that this all should not happen, it's still the most likely way of it not happening :)