Attachments: Oops! That page doesn’t exist or is private

AI-generated summary

Amirk reports an issue where attachment links result in the error ‘Oops! That page doesn’t exist or is private’ after a Discourse installation. Initially working for two weeks, the problem started suddenly despite no changes to settings, except for a temporary adjustment to attachment size. After reinstalling Discourse and confirming the issue persists, Amirk identifies that the problem is caused by hitch & varnish proxy conflicts when running Discourse alongside other sites. The issue does not occur when Discourse runs alone. Amirk suspects a bug, and Canapin suggests checking logs and safe mode, though no errors were found. Jagster offers a cryptic response that may be unrelated.

when Attachment link is clicked, error :
Oops! That page doesn’t exist or is private.
New to discourse, don’t know how to figure out.
not too much settings tweaks, only
toggle on Prevent anonymous users from downloading attachments.
after installation, working for two weeks but suddenly stopped.
any help? thanks.

Welcome Amirk :slight_smile:

Is your install a standard install?
Did you try using the safe mode?
Do you have anything suspicious in your logs (Admin → Logs)?

Installed Discourse via standard, only thing I didn’t created docker user & every thing done via root user.
Safe mode didn’t help as using default theme with no plugin.
No error log
I increased max attachment size via

After that no problem with large uploads.
But now I also revert this change via backup file of app.yml, and rebuild app. but no help.
upload new attachments, no old nor new attachments are working.
One problem is uploaded files still exists on server, not being deleted along with post delete.

I completely removed discourse from server, prune all inactive docker images, reinstall discourse, upload attachments. at that time everything fine.
to check whether again issue come back or not, I didn’t change any settings.
wait for three days, and again check my attachments. now same problem came back.
No attachments are being downloaded.
Now I can confirm its a bug.
Can any one help, why this happens automatically?

This problem was due to hitch & varnish proxy, as I already running other sites
when I ran discourse alone without proxy, no problem.

return(pipe); works.