Page MenuHomePhabricator

Investigate 'missingparam' errors on 'file' step
Closed, ResolvedPublic

Description

select left(timestamp,8), count(*) from UploadWizardErrorFlowEvent_11772725 where event_code='missingparam' and event_step='file' group by left(timestamp,8);

+-------------------+----------+
| left(timestamp,8) | count(*) |
+-------------------+----------+
| 20150608          |        1 |
| 20160302          |       11 |
| 20160303          |      168 |
| 20160304          |       71 |
| 20160305          |       65 |
| 20160306          |       78 |
| 20160307          |       81 |
| 20160308          |       83 |
| 20160309          |       69 |
| 20160310          |       59 |
| 20160311          |       40 |
| 20160312          |       42 |
| 20160313          |       69 |
| 20160314          |       21 |
| 20160315          |       87 |
| 20160316          |       94 |
| 20160317          |       52 |
| 20160318          |       69 |
| 20160319          |       24 |
| 20160320          |       40 |
| 20160321          |       11 |
+-------------------+----------+
21 rows in set (0.63 sec)

This sudden onset of 'missingparam' on 'file' step (they also occur for 'details', but I suspect that's all T130549) is new and matches 1.27.0-wmf.17 deployment to Commons (2016-03-02). We did a lot of refactoring in that version :(

Event Timeline

Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript

Change 280083 had a related patch set uploaded (by Bartosz Dziewoński):
ApiUpload: Add debug logging for T130563

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

Change 280092 had a related patch set uploaded (by Bartosz Dziewoński):
ApiUpload: Add debug logging for T130563

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

Change 280092 merged by MaxSem:
ApiUpload: Add debug logging for T130563

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

Change 280083 abandoned by Bartosz Dziewoński:
ApiUpload: Add debug logging for T130563

Reason:
Not needed on master, already merged to wmf.18.

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

This looks like a bug in the fallback non-FormData code path. Example debug log entry:

missingparam: Array
(
    [filename] => 1459257754730image1459134503694.png
    [comment] => DUMMY TEXT
    [tags] => 
    [text] => 
    [watch] => 
    [watchlist] => preferences
    [ignorewarnings] => 1
    [file] => 
    [url] => 
    [filekey] => 
    [sessionkey] => 
    [stash] => 1
    [filesize] => 
    [offset] => 
    [chunk] => 
    [async] => 
    [checkstatus] => 
    [token] => <snip>
)

The "DUMMY TEXT" thingy is an obvious tell (no idea why we have that, but it's only in the mw.ApiUploadHandler). Nice, I was expecting that I'd need to add something to our request to be able to tell which is which.

Now the question is, what and why is still using the fallback code. We're planning to get rid of it per T126763. I'm not sure if these are actual browsers not supporting FormData, or if something is detecting their capabilities wrong.

They are, in fact, actually incompatible browsers. In 1553 logged errors, there are 147 unique user-agents. Among them I found:

  • UC Browser, various versions: 62
  • Android 4.x stock browser: 46
  • Firefox, versions 3.6-12: 19
  • Chrome, versions 11-20, 31: 11
  • Safari, versions 4-6: 8

In my opinion this is not worth fixing, especially since we decided to remove support for these browsers next week-ish (T126763) and give them the plain upload form. Let's just wait for that.

I updated https://www.mediawiki.org/wiki/UploadWizard#Compatibility to exclude browsers which appeared here, so that we can tell their users that they should update ;)

(Leaving this open until T126763 is deployed and I confirm that the error is gone from the logs.)

+-------------------+----------+
| left(timestamp,8) | count(*) |
+-------------------+----------+
| 20150608          |        1 |
| 20160302          |       11 |
| 20160303          |      168 |
| 20160304          |       71 |
| 20160305          |       65 |
| 20160306          |       78 |
| 20160307          |       81 |
| 20160308          |       83 |
| 20160309          |       69 |
| 20160310          |       59 |
| 20160311          |       40 |
| 20160312          |       42 |
| 20160313          |       69 |
| 20160314          |       21 |
| 20160315          |       87 |
| 20160316          |       94 |
| 20160317          |       52 |
| 20160318          |       69 |
| 20160319          |       24 |
| 20160320          |       40 |
| 20160321          |       11 |
| 20160323          |       87 |
| 20160324          |       37 |
| 20160325          |       26 |
| 20160326          |       96 |
| 20160327          |       37 |
| 20160328          |       13 |
| 20160329          |       23 |
| 20160330          |       17 |
| 20160331          |       10 |
| 20160401          |        1 |
| 20160402          |       29 |
| 20160403          |       37 |
| 20160404          |       36 |
| 20160405          |       16 |
| 20160406          |       33 |
+-------------------+----------+