Thread:Project:Support desk/What could trigger MediaWiki:Session fail preview?/reply

This message shows, when some submitted data is empty or does not match with the expected. So, if the submitted edit token while uploading does not match with the saved, the error message will appear: https://github.com/wikimedia/mediawiki-core/blob/4ae146bf3753d6c8b4f64e74a2d8ac67b0b0b7fc/includes/specials/SpecialUpload.php#L124

On edit the error will appear, if the token isn't ok and the text submitted isn't empty: https://github.com/wikimedia/mediawiki-core/blob/02e0261b6eb2b1ff23274a26942f471440cea217/includes/EditPage.php#L3457

Most of the time, this is because of an ended session, maybe because of time between start an edit section and save/end this :)