Extremely high amount of errors for anonymous editors when using MobileFrontend's wikitext editor
Open, NormalPublic

Description

Taking a look at errors in the mobile web editing experience a large chunk of errors have occurred since anonymous editing was switched on.
Since anonymous editing turned on [1]
http 57477
ve-load-error 281
ve-save-error 636

Most of these errors occur when the user is anon [2]:
http 51484
ve-load-error 141
ve-save-error 484

[1] select event_errorText, count(*) from MobileWebEditing_8599025 where event_action = 'error' and timestamp > 20150401000000 and timestamp < 20150427000000 group by event_errorText
[2] select event_errorText, count(*) from MobileWebEditing_8599025 where event_action = 'error' and timestamp > 20150401000000 and timestamp < 20150427000000 and event_username is NULL group by event_errorText

Jdlrobson updated the task description. (Show Details)
Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson added a project: Readers-Web-Backlog.
Jdlrobson moved this task to To Triage on the Readers-Web-Backlog board.
Jdlrobson added a subscriber: Jdlrobson.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 28 2015, 11:28 PM

In theory 'http' error should only happen when a user cannot get an edit token (in this.postWithToken the deferred object must be rejected which only seems to happen if this.get( { action: 'tokens', type: type, assert: assert } ); either fails or returns a response with no token. @Anomie any idea why this might be happening?

Jdlrobson set Security to None.

this.get( { action: 'tokens', type: type, assert: assert } );

What are your values for "type" and "assert" there? In particular, if assert is "user" then you're going to get an error for every anon request ;)

Other than that, what's the specific API request query data? And are you sure there isn't some other source for "http" errors?

phuedx added a subscriber: phuedx.

Moved this to In Sprint as this appears to be actively investigated.

Elitre added a subscriber: Elitre.May 1 2015, 4:17 PM
Jdlrobson added a comment.EditedMay 1 2015, 6:59 PM

This is the post that is happening on the client:

		var api = new mw.Api();
		api.postWithToken( {
					action: 'edit',
					title: self.title,
					prepend: '(text)',
					section: sectionId,
					summary: options.summary,
					captchaid: options.captchaId,
					captchaword: options.captchaWord,
					basetimestamp: self.timestamp,
					starttimestamp: self.timestamp
				} ).fail( $.proxy( result, 'reject', {
					type: 'error',
					details: 'http'
				} ) );

The deferred object is being rejected.
We'd have to do more investigation to find more about the parameters the users are sending.

Anomie added a comment.May 1 2015, 9:16 PM
					prependtext,

Really, no key?

					basetimestamp: self.timestamp,
					starttimestamp: self.timestamp

That doesn't seem right. starttimestamp is the time you started editing (e.g. when you fetched the current content to modify it), while basetimestamp is the timestamp of the revision you're editing.

If self.timestamp there is the revision timestamp, then you might be getting failures because the user is trying to edit a page that has been deleted since the timestamp of its top visible revision. If self.timestamp there is the start timestamp, I'm not sure what it'll do with getting a timestamp that doesn't correspond to a revision.

				} ).fail( $.proxy( result, 'reject', {
 					type: 'error',
 					details: 'http'
 				} ) );

So you're rejecting as "http" to your caller no matter why the API query actually failed? No wonder you're seeing a lot of "http" errors.

Florian added a subscriber: Florian.May 2 2015, 4:17 PM

Task is supposedly in "current sprint" but not in either sprints so I've added it to both.

@Anomie the reject should only be reached if the API 404s or 500s etc.. there is a separate error handler in postWithToken for when the API responds with an error key.

The special error handler in postWithToken only handles badtoken errors. Any other error seems like it would be passed through to your handler and get turned into an "http" error.

Neil_P._Quinn_WMF triaged this task as Normal priority.May 18 2015, 8:54 PM

Update:
This is still happening. In last two weeks [1]:

http 19581
ve-load-error 144
ve-save-error 235
Would be great to get to the bottom of these errors.

[1] select event_errorText, count(*) from MobileWebEditing_8599025 where event_action = 'error' and timestamp > 20150608000000 and event_username is NULL group by event_errorText

@Jdlrobson: It looks like we're going to have to separate out these errors: "http" could mean any number of things.

Krenair added a subscriber: Krenair.Jul 2 2015, 4:52 PM

You're going to need to provide more information than just ve-(load|save)-error as well.

You're going to need to provide more information than just ve-(load|save)-error as well.

Anybody able to provide that info? @Jdlrobson ?

Jdforrester-WMF renamed this task from Extremely high amount of errors for anonymous editors to Extremely high amount of errors for anonymous editors when using MobileFrontend's wikitext editor.Aug 4 2015, 6:47 PM
Restricted Application added a project: Readers-Web-Backlog. · View Herald TranscriptAug 4 2015, 6:47 PM

You're going to need to provide more information than just ve-(load|save)-error as well.

Anybody able to provide that info? @Jdlrobson ? Anyone else?

You're going to need to provide more information than just ve-(load|save)-error as well.

Anybody able to provide that info? @Jdlrobson ? Anyone else?

Once T110272: Instrument MobileFrontend to use version 13457736 of the Edit schema instead of the MobileWebEditing schema is complete we'll have the more information, and be able to tell if the numbers are high in relative terms, as well as what their causes are.