saber-notes / saber

The cross-platform open-source app built for handwriting
https://saber.adil.hanney.org
GNU General Public License v3.0
2.34k stars 152 forks source link

Login to Nextcloud does not work #435

Open HoWilgh opened 1 year ago

HoWilgh commented 1 year ago

Describe the bug Can't log into a custom or the suggested Nextcloud server from within the Android app nor from flatpack instance.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Settings' -> 'Tap to login with Nextcloud'
  2. Fill in the username and password for the 'built-in' https://nc.saber.adil.hanney.org or use a custom server with user-name and password (tested login via the web-interfaces)
  3. Press 'Log in'
  4. See error 'Log in failed, please check your details and network connection'

Expected behavior Log into the nextcloud instances works.

Device (please complete the following information):

iamanewcar commented 1 year ago

i can confirm i am having the same issue, mine might be due to it being an https, and not having a real certificate, but i was able to connect one client and not any others, now i cant connect any

WasteOfO2 commented 1 year ago

Is it specific to adil's instance? Or can u repro this on other NC instances as well? There are some free cloud providers, or if u have any selfhosted ones. I would advise to check if thats the case.

Also if possible, run the flatpak in terminal and try to connect to adil's NC instance. Copy the log generated and post it (preferably in a pastebin). This should help us know what exactly is the problem @HoWilgh

i can confirm i am having the same issue, mine might be due to it being an https, and not having a real certificate, but i was able to connect one client and not any others, now i cant connect any

Can u give some details abt which client connected and when? @iamanewcar

knttr commented 1 year ago

Version: v0.9.6 F-Droid (9060) OS: Linage OS 19.1

Nextcloud: V25.0.5 Certificate: Let's Encrypt TOTP: Enabled

I can confirm the issue as described in the OP. All other apps on this system can connect to my privately hosted Nextcloud instance.

minnten commented 1 year ago

Hello,

I have the same issue, with the actual flatpack version 0.9.12 on my Arch system. If I use the Appimage, everything works fine.

Greetings and Thanks for your work Minnten

WasteOfO2 commented 1 year ago

Hello,

I have the same issue, with the actual flatpack version 0.9.12 on my Arch system. If I use the Appimage, everything works fine.

Greetings and Thanks for your work Minnten

Can u run the flatpak in the terminal, try to login to nextcloud and post the logs (preferably in a pastebin)?

If possible, do the same with the appimage

minnten commented 1 year ago

Hello,

of course, I can:

Same output with Flatpak and AppImage: flutter: dynamic_color: Accent color detected. ** (saber:36507): WARNING **: 17:04:52.719: atk-bridge: get_device_events_reply: unknown signature

nothing special when I click the Login-Button.

But here comes another strange thing, with the new version I am not able to connect to my Nextcloud

But with an old outstanding config I am able to reconnect.

Greetings Minnten

AZtech commented 1 year ago

I can confirm that it also does not work with a locally hosted Nextcloud server. Other applications (QOwnnotes for example) have no issues. Also, I get an error messages "please enter a valid URL", eventhough I have defined it in my "hosts" file (I'm running Linux Mint). So perhaps there is an issue with the handling of the URL? When I enter the IP-Address, I get the error message "Anmeldung fehlgeschlagen" and to check the network connection. I get the same error message, when I enter a non-exisiting IP-Address. So it seems to fail very early on in the connection process. Cheers,

AZtech

adil192 commented 1 year ago

@AZtech Please can you share the format of the URL you entered to get the "invalid URL" message? This is an issue with the URL validation and should be easy to fix

AZtech commented 1 year ago

Here are the entries from my "hosts": 192.168.0.35 sync15 192.168.0.35 sync15.local the "sync15.local" gives the error "Anmeldung fehlgeschlagen". So it gets one step further than if I just use "sync15". So it means it cannot resolve "sync15" to "192.168.0.35". are you looking for a "." in the URL?

adil192 commented 1 year ago

Ah it doesn't try to resolve the URL it just checks the format. Since this isn't a usual format, I don't think I'll add it to the validation since a URL like that is in most cases a mistake by the user.

AZtech commented 1 year ago

ok. Unfortunately, I'm too lazy to add the ".local" to all the URLs in my hosts. Perhaps this is a good moment to "tidy up" my hosts file ;)

AZtech commented 1 year ago

The issue is still there: I can't connect to my local Nextcloud-Server. I have a self-signed certificate. It could that be an issue? Also, I noticed, that in my nginx-config, my "/.well-known..." are not configured properly. When connecting to your NC-Server, the link is "https://nc.saber.adil.hanney.org/remote.php/dav/files/my_name" I installed NC in the subfolder "nextcloud" (https://192.168.0.35/nextcloud". Could this be an issue?

I really like the app, but I need to connect it to my local NC-Server. Thanks for your work!