Page MenuHomePhabricator

"Uncaught TypeError: Cannot use 'in' operator to search for 'length' in foo.jpg" when uploading a file that is a duplicate (under the same name)
Closed, ResolvedPublic

Description

I get the following exception when uploading a file that is a duplicate. For example, try uploading the attached to Commons.

Uncaught TypeError: Cannot use 'in' operator to search for 'length' in Basilica_di_San_Lorenzo_(Milano)_–_Scorcio_della_facciata.jpg
    at isArraylike (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:7:204)
    at Function.each (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:4:985)
    at MWUploadWizardUpload.mw.UploadWizardUpload.setDuplicateError (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=ext.uploadWizard&skin=vector&version=0rvdae8:102:170)
    at MWUploadWizardUpload.mw.UploadWizardUpload.setTransported (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=ext.uploadWizard&skin=vector&version=0rvdae8:100:701)
    at Object.eval (eval at <anonymous> (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:4:681), <anonymous>:34:269)
    at Object.<anonymous> (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:47:129)
    at fire (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:45:122)
    at Object.fireWith [as resolveWith] (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:46:431)
    at Object.deferred.(anonymous function) (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:47:790)
    at Object.<anonymous> (https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:47:129)

Event Timeline

matmarex created this task.Jan 30 2017, 9:44 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptJan 30 2017, 9:44 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The message/backtrace above is from Chromium, different browsers have different ones. A bit difficult to estimate because of that, but this is hitting under 100 users per day. Probably caused by rEUWI4194791bf29f: Treat duplicate & duplicate-archive warnings differently.

Change 335242 had a related patch set uploaded (by Matthias Mullie):
Move error/warning handling out of setTransported and into the upload handler

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

Change 335426 had a related patch set uploaded (by Matthias Mullie):
Fix 'nochange' warning handling

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

Change 335426 merged by jenkins-bot:
Fix 'nochange' warning handling

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

matmarex renamed this task from "Uncaught TypeError: Cannot use 'in' operator to search for 'length' in foo.jpg" when uploading a file that is a duplicate to "Uncaught TypeError: Cannot use 'in' operator to search for 'length' in foo.jpg" when uploading a file that is a duplicate (under the same name).Feb 1 2017, 6:18 PM
matmarex closed this task as Resolved.
matmarex removed a project: Patch-For-Review.