Upload wizard fails with api-error-badtoken, cannot resubmit
|mediawiki/extensions/UploadWizard : wmf/1.26wmf22||Really recover from 'badtoken' error when uploading|
|mediawiki/extensions/UploadWizard : master||Really recover from 'badtoken' error when uploading|
- Mentioned In
- rEUWI72dbd8cd4eda: Really recover from 'badtoken' error when uploading
rMW408974afeb3f: Updated mediawiki/core Project: mediawiki/extensions/UploadWizard…
rEUWIed65064bea11: Really recover from 'badtoken' error when uploading
rMEXTa6dbce2f4701: Updated mediawiki/extensions Project: mediawiki/extensions/UploadWizard…
T112514: Interner Fehler: Der Token ist fehlerhaft.
- Mentioned Here
- T102199: Reports of a high number of edits being rejected due to loss of session data
T71691: Ability to recover from an Expired session (badtoken)
Which size do these image files have?
Do you have the "Chunked uploads for files over 1MB in Upload Wizard" preference enabled on Commons in the Upload Wizard preferences?
I don't think this warrants "Unbreak Now!" priority. I believe this only affects users who open UploadWizard, leave the tab open for at least a few minutes while doing something else, and then come back to it. I'm going to debug this today, anyway.
@intracer, do you see the error again after refreshing the page and trying to upload files again? @Steinsplitter, since you filed the other bug in German – if you speak German, can you ask the reporter the same question as above? If yes, then this looks like a much weirder issue which would probably not be limited to UploadWizard (but also affect things like editing pages or setting preferences).
I don't believe we have any tests that would cover this.
Unit tests for this would be unpleasant to write (you'd have to mock several API requests and responses) if UploadWizard didn't have as much global state as it does; right now I think they're all but impossible to write. We have unit tests for some areas, but only a few.
It's difficult to catch in browser tests (which are in a better state than unit tests) because, like I mentioned, running into this bug naturally requires leaving the browser tab/window idle for at least a few minutes, until your session expires. (I'm not sure how long sessions are set to last on Wikimedia wikis, but probably something like 30 minutes.)