Users of the Dynare Discourse forum are experiencing non-deterministic upload failures when attempting to upload .mod ASCII files — a core file type for their platform — with approximately 50% of uploads failing silently. Uploading the same content as .txt or inside a .zip works reliably. The issue does not affect other file types. Administrators, including those impersonating affected users, have been unable to reproduce the problem. A leading hypothesis is that Discourse mistakenly treats .mod files as media files (e.g., MOD video format), triggering unintended conversion attempts — evidenced by error logs referencing PNG-to-JPG conversion failures even when such conversions are disabled JohannesPfeifer. While Cloudflare DNS was considered as a potential factor, it’s unlikely to affect the isolated Docker container running Discourse JohannesPfeifer. The issue appears random across users, though it may be consistent for certain individuals; affected users often abandon uploads and paste content instead JohannesPfeifer. Further investigation is pending user-reported device, OS, and browser details Canapin, JohannesPfeifer.
The Dynare project runs a Discourse forum based on the official Docker image. The main file type used are ASCII files with the ending .mod (for “model”). Since about a month or so, users are randomly (≈50% of the cases) experiencing upload issues for that filetype (and no other file type). The upload simply gets stuck:
Uploading the same content with .txt ending or in a zip-file works. Unfortunately, the administrators have not been able to replicate the issue, even when impersonating the users affected.
Our hunch is that there is an issue with attempted file conversions, because Discourse seems to attempt to treat the .mod-file as a media file. Trying to upload an actual .mod video file (as supported e.g. by VideoLAN) results in the error message:
/var/www/discourse/lib/discourse.rb:137:in `exec': An error happened when converting from PNG to JPG
That message appears even if the png to jpg quality-setting is set to shut off conversions.
Just an odd idea, not even high on the list, but what you noted conjured this up.
If the admins are impersonating a user they are probably not using the same route from client machine to server. I am thinking that a service like Cloudflare might be in the mix.
Thanks. The server uses the CloudFare DNS servers. But I doubt this affects our Discourse instance because it is in its own container and thus uses the DNS servers configured by the Discourse developers.
Thanks for looking into this. Overall, it seems to happen randomly. I don’t know whether it happens consistently for some subset of users and not at all for others. But users who encounter the issue seem to give up and subsequently paste the file’s text content. So that may be the case.