this post was submitted on 02 Jun 2024
5 points (77.8% liked)

Photon

273 readers
1 users here now

Photon for Lemmy

A client for the fediverse designed to be intuitive, fast, and beautiful.

Share your themes, ask questions, report bugs, or check on the latest updates here!

You can contact the dev at @Xylight@lemdro.id.

Rules

  1. Posts must be related to Photon in any way
  2. Don't be mean
  3. If your post is a bug report, please preface the title with [solved] if it's been fixed.

founded 11 months ago
MODERATORS
5
Failed to fetch the page (discuss.tchncs.de)
submitted 5 months ago* (last edited 5 months ago) by maki@discuss.tchncs.de to c/photon
 

I have an issue with proton. I hosted the software on my own homeserver with portainer.

Often it comes the failure "TypeError: NetworkError when attempting to fetch resource."

when i try to upload images

or

when I try to post something

in photon. It doesnt work in Firefox (Mac) or Safari (iOS, MacOS).

The instance is not the problem. It works with voyager.

top 8 comments
sorted by: hot top controversial new old
[–] ptz@dubvee.org 4 points 5 months ago (2 children)

Do you have it running under HTTPS? Since all of the API calls are HTTPS, you'll need to run it either under localhost or through a reverse proxy with SSL enabled.

Also, did you set PUBLIC_INSTANCE_URL environment variable to the domain of your home instance?

e.g. PUBLIC_INSTANCE_URL=discuss.tchncs.de

If you open your browser console, it should show some errors to indicate the problem.

[–] maki@discuss.tchncs.de 3 points 5 months ago (1 children)

On my Homeserver runs an NGINX Proxy Manager. There is HTTPS activated. The proxy use HTTP to connect to the local Docker Container.

Internet --> NGINX Proxy Manager --> local Docker Container

The Instance discuss.tchncs.de is not mine, but I have set the enviroment "PUBLIC_INSTANCE_URL=discuss.tchncs.de".

The errors are paste here

[–] ptz@dubvee.org 2 points 5 months ago* (last edited 5 months ago)

Errors are definitely indicating CORS is the issue. Specifically, that the Access-Control-Allow-Origin header is missing:

Grund: CORS-Kopfzeile 'Access-Control-Allow-Origin' fehlt). Statuscode: 503.

Are you perhaps (accidentally) stripping out that header in your NPM config? Or do you have a browser extension that might be doing so?

[–] Xylight 2 points 5 months ago

Photon can make requests through http, but it has to be manually specified (PUBLIC_INSTANCE_URL=http://discuss.tchns.de)

[–] andrew_s@piefed.social 4 points 5 months ago (2 children)

This is for other frontends, but I remember reading something about image uploads not working when you're self-hosting due an issue with CORS. I don't know what CORS is, really, so can't expand on it. It may be that you need to upload the image to a filehost like postimages.org and link to the inline version of that instead.

[–] ptz@dubvee.org 3 points 5 months ago* (last edited 5 months ago) (1 children)

That should be fixed somewhere in 0.19.x (not sure which version; maybe 0.19.0?)

[–] maki@discuss.tchncs.de 1 points 5 months ago

I use 0.19.3

[–] maki@discuss.tchncs.de 2 points 5 months ago

Thank you for your answer. But there is also the problem that the communities doesn’t load.