Page MenuHomePhabricator

UploadWizard's error handling is totally broken
Closed, ResolvedPublic

Description

Try uploading a file to http://commons.prototype.wikimedia.org/uwd/Special:UploadWizard (whose upload API is broken right now, gonna leave it that way for now so this bug remains reproducible), and the following sequence of events will take place:

  • Upload a file with a name that's unlikely to already be used on the wiki
  • Spinner displays while the file uploads
  • Spinner is replaced by a green checkbox and the text "OK"
  • An alert box appears with "error : Internal error : An internal error occurred"
  • The green checkbox disappears and the green OK text is replaced with the red text "[mwe-upwiz-failed]"
  • An alert box appears with "huh?"
  • According to Firebug, the file http://commons.prototype.wikimedia.org/uploadwizard-deployment/extensions/UploadWizard/resources/16px-Gnome-process-stop.svg.png is requested (this URL 404s), possibly explaining why the green checkbox isn't replaced with a red X or something
  • After all this, "0 of 1" will change to "1 of 1", and the wizard will CONTINUE TO THE NEXT STEP as though nothing went wrong
  • Finish the wizard, and the wizard will simply hang at the very last step

It gets even more fun when trying to upload a file with a name that already exists on the wiki, e.g. example.png . In that case, the error message in the firsts alert box is "error: overwrite: Overwriting an existing file is not allowed".


Version: unspecified
Severity: major

Details

Reference
bz25787

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedkaldari
Resolvedkaldari
Resolvedkaldari
InvalidNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedkaldari
ResolvedNone
ResolvedNone
Resolvedkaldari
ResolvedNone
DeclinedNone
Resolvedkaldari
ResolvedNone
DeclinedNone
Resolvedkaldari
Resolvedkaldari
ResolvedNone
Resolvedkaldari
DeclinedNone
ResolvedNone
ResolvedNone
ResolvedNone
InvalidNone
Resolvedkaldari
Resolvedkaldari
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedkaldari
Declinedkaldari
Resolvedkaldari
Resolvedkaldari
Resolvedkaldari
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedkaldari
Resolvedkaldari
Resolvedkaldari
ResolvedNone
Resolvedkaldari
Resolvedkaldari
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedkaldari
ResolvedNone
ResolvedNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:23 PM
bzimport added a project: UploadWizard.
bzimport set Reference to bz25787.

neilk wrote:

I understand the "WTF EVERYTHING IS BROKEN" tone here, but it's actually *less* broken than it used to be.

What you're seeing now is an artifact of it now knowing what actually went wrong, but not having the behavior to respond correctly. This is next on the agenda.

If you're thinking that's the sort of feature that should have been added first, well, I agree, but I had to write my own API handlers to make this even conceivable.

neilk wrote:

Anyway, thanks (really! not sarcastic!) for coding up the bugzilla item -- you did a lot of work codifying the problem. I just have to bridge the new error information with the new way of indicating an issue and it should work.

Also, whenever something goes wrong in the final api.php?action=upload call in the very last step of the wizard (in my case, HTTP 500 because of a fatal error caused by a botched merge), there is no error reporting whatsoever, the wizard just 'hangs' (i.e. the interface remains blurred and inactive forever).

Merging bugzilla components "Multimedia Usability" and "Upload Wizard"

neilk wrote:

Largely fixed in r77136, at least for the first "upload" page.

Working on fixes for subsequent API calls going wrong.

neilk wrote:

Considering this bug closed, at least insofar as it represents upload error handling.

Lots of revisions have fixed this, but the last holes should be plugged with

r84221, r84223, r84224, r84226, r84286, r84301, r84303.

For description page API errors refer to bug 24758.

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:29 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:23 AM