astubenbord / paperless-mobile

An (almost) fully fledged mobile paperless client.
GNU General Public License v3.0
685 stars 36 forks source link

[Bug]: Login Paperless Mobile bei HomeAssistant installation #381

Open andilix opened 7 months ago

andilix commented 7 months ago

What happened?

Ich habe eine Installation von Paperless ngx als Addon von HomeAssistant eingerichtet und läuft auch alles soweit.

Jetzt wollte ich die Paperless Mobile App benutzen. Server angeben, Benutzername und Passwort eingeben klappt, beim nächsten Bildschirm steht dann Authentifizieren und es geht nichts mehr weiter.

Steps to reproduce

Paperless Mobile starten Server Adresse eingeben und auf Fortfahren klicken Nutzername und Passwort eingeben und auf Anmelden klicken Bleibt bei Authentifizieren stehen siehe Screenshot

Log output from the app

2024-02-05 18:18:27.729 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to restore previous session...
2024-02-05 18:18:27.729 DEBUG   --- [      AuthenticationCubit] - restoreSession           : There is nothing to restore.
2024-02-05 18:18:27.737 INFO    --- [                         ] -                          : Setting refresh rate to 120.00000762939453
2024-02-05 18:20:59.383 DEBUG   --- [      AuthenticationCubit] - login                    : Trying to log in andilix@19***57...
2024-02-05 18:20:59.384 DEBUG   --- [      AuthenticationCubit] - _addUser                 : Adding new user andilix@19***57..
2024-02-05 18:20:59.385 DEBUG   --- [      AuthenticationCubit] - _addUser                 : Fetching bearer token from the server...

Screenshots

WhatsApp Bild 2024-02-05 um 18 22 36_0b7fc193 WhatsApp Bild 2024-02-05 um 18 23 58_95f492db

Paperless-ng*x Version

2.4.3

Paperless-Mobile Version

3.2.1

Device

Samsung S24 Ultra

Operating System Version

Android 14

Device Locale

Austria

Selected Locale

German

Additional Context

No response

Reussi commented 7 months ago

same Problem!

astubenbord commented 7 months ago

Could you provide more information about your setup? Is it behind a reverse proxy?

sturmi commented 7 months ago

Same Issue. Same Setup with Fairphone 3, Android 13. Home Assistent 2024-02 Paperless AddOn 2.4.1 Not behind Proxy, Same IP 192.168.177.x

sturmi commented 7 months ago

--- [ AuthenticationCubit] - login : Trying to log in ngxadmin@hoal... 2024-02-15 15:06:27.567 DEBUG --- [ AuthenticationCubit] - _addUser : Adding new user ngxadmin@hoal.. 2024-02-15 15:06:27.567 DEBUG --- [ AuthenticationCubit] - _addUser : Fetching bearer token from the server... 2024-02-15 15:21:11.785 DEBUG --- [ AuthenticationCubit] - restoreSession : Tryin 2024-02-15 15:26:00.702 INFO --- [ ] - : Setting refresh rate to 60.000003814697266 2024-02-15 15:26:31.727 DEBUG --- [ AuthenticationCubit] - login : Trying to log in ngxadmin@1952... 2024-02-15 15:26:31.746 DEBUG --- [ AuthenticationCubit] - _addUser : Adding new user ngxadmin@1952.. 2024-02-15 15:26:31.752 DEBUG --- [ AuthenticationCubit] - _addUser : Fetching bearer token from the server...

andilix commented 7 months ago

Kein Proxy

jnyenhuis-dev commented 7 months ago

Same Problem.

JensMro commented 7 months ago

Same Problem here. I am pretty sure this is a problem related to the HomeAssistant login. When I open the Paperless link in my mobile browser it is first asking me to log into HomeAssistant and then into paperless and this works fine for me. I guess the app will just try to directly log into paperless?

Freneato commented 6 months ago

Just specify a port in the configuration of the addon in Home assistant as described in the documentation of the addon: image

I used port 8000.

image

image

to login to Paperless page use your HA IP:PORT e.g. 192.168.178.23:8000

sturmi commented 6 months ago

Just specify a port in the configuration of the addon in Home assistant as described in the documentation of the addon: image

I used port 8000.

image

image

to login to Paperless page use your HA IP:PORT e.g. 192.168.178.23:8000

Hi Freneato, that solved the issue for me 🤩 Thank you very much

andilix commented 6 months ago

Just specify a port in the configuration of the addon in Home assistant as described in the documentation of the addon: image

I used port 8000.

image

image

to login to Paperless page use your HA IP:PORT e.g. 192.168.178.23:8000

Thanks to Freneato's solution, it now works for me too. Thank you!!

Johnyboy9 commented 6 months ago

Just specify a port in the configuration of the addon in Home assistant as described in the documentation of the addon: image

I used port 8000.

image

image

to login to Paperless page use your HA IP:PORT e.g. 192.168.178.23:8000

Thank you for this solution. Worked for me too internally. But what URL do I have to use if I want to access externally?

guandalf commented 6 months ago

I thnk support for the homeassistant ingress api should be added. Like:

https://github.com/patzly/grocy-android/blob/2fa4a98e9ece6ffd9f43a46d8b7303340741412c/app/src/main/java/xyz/zedler/patrick/grocy/form/FormDataLoginApiForm.java#L104