hoarder-app / hoarder

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
https://hoarder.app
GNU Affero General Public License v3.0
5.44k stars 171 forks source link

[Bug] Network Request Failed #381

Open marco-studer-srf opened 1 month ago

marco-studer-srf commented 1 month ago

I cannot log in using the mobile app. URL is correct.

Could it be that you cannot handle passwords with ridiculous length and number of special characters?

Screenshot_20240909_094304_Hoarder App

MohamedBassem commented 1 month ago

No this is unlikely to be a password issue. This is usually the server address being unreachable from the phone or incorrectly setup (e.g invalid certs). Can you tell us if you're using http/https, is Hoarder behind a reverse proxy? Any special setup there?

marco-studer-srf commented 1 month ago

The server is behind traefik reverse proxy. The server is using https with a self-signed certificate. The root certificate is added as CA on the phone. Could this be a problem?

hubono commented 1 month ago

Hi I'm having the same issue. I installed hoarder on oracle free tier. All went ok. I installed the app on Android and it's working good. Now I installed on iphone, made a new user thought the web browser on the iphone, inputted the same details on the app and i get network request failed. I tried on the wifi and 5g, both fail. Im using http

CrypticC3s4r commented 1 month ago

Having the same issue with Android, It is behind a nginx reverse proxy.

Extension access and Direct Access are functioning well, just mobile makes the problem.

MohamedBassem commented 1 month ago

I'll release a hoarder mobile update soon that hopefully can help us debug those network connection issues and show exactly the kind of errors that are being reported.

MohamedBassem commented 1 month ago

I've sent (https://github.com/hoarder-app/hoarder/commit/3452e47c94a55a525620c244f57edb9482989d1c) to add a new "Test connection" page to debug server connection issue. I hope this help figure out why the app is not working for you. I've submitted this to apple/google for review, should hopefully be available for download by Monday.

marco-studer-srf commented 1 month ago

Running connection test ... Using address: https://xxx Network connection failed: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Okay, it seems to be the certificate. However, I added the certificates to the root certificates of the phone. Accessing Hoarder via browser on the phone is working.

MohamedBassem commented 1 month ago

@marco-studer-srf Glad to see the new connection debugging thing being useful! Let's change the issue title to be about self signed certs then. I'll check if there's any configuration I need to pass to the app manifest so that it can pick up all of your trusted certs (most likely over the weekend).

chrishoage commented 3 weeks ago

I am experiencing this issue using http - I get the same error

Network connection failed: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Except that I'm using http specifically, and the debug output indicates this.

Is the app trying to upgrade to an https connection?

If so - then I'm hitting the same self signed cert error - however I do not wish to add this cert to the root certificates of my phone.

Can there be an option to allow self signed certs?