saber-notes / saber

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

Login to local Nextcloud instance with ipv4 address does not work #1318

Closed VibrantTreeStump closed 3 months ago

VibrantTreeStump commented 4 months ago

Before submitting an issue, please check the following

Describe the bug

I have a local Nextcloud instance that I want to use for synchronization. When trying to access it via its ipv4 address, the browser does not work. It still shows the banner "please follow the instructions in the browser" but clicking on "browser didn't open? click here" does not do anything. The same thing happens when I try to access it via hostname.local I currently have another test instance running behind a reverse proxy, and accessing it via the domain name does work. Also I can ping my "production server" via its ipv4 address, so the problem has to be in how the app handles (local) ipv4 addresses and the .local TLD

To reproduce

  1. Try to access local Nextcloud instance via ipv4 or .local address
  2. Nothing happens

Expected behavior

Accessing a local instance should work even without a reverse proxy

Saber version

v0.24.2 F-Droid (24020)

Device

Anything else?

No response

QubaB commented 3 months ago

I think nobody will take care about this problem. I think it is not saber problem.

Does it work when you use you browser (outside of saber)? How is managed nextcloud server certificate, is it issued for hostname.local?

VibrantTreeStump commented 3 months ago

I must have been super tired when I wrote the issue. I had only tested ping 192.168.x.x but I actually hadn't tested ping hostname.local, I have no idea why I thought I had. Now that you've said it and I actually tested it, of course hostname.local doesn't resolve, so that's a problem on my end. I updated the issue accordingly.

I did however test logging into Nextcloud via ipv4 again. Some apps open the browser like saber does, some handle the login internally

So I'm certain the problem with ipv4 login has to be specific to saber.

adil192 commented 3 months ago

You might need to enable self-signed certificates at the bottom of Saber's settings page

It still shows the banner "please follow the instructions in the browser" but clicking on "browser didn't open? click here" does not do anything.

Can you share the logs?

VibrantTreeStump commented 3 months ago

Well, that is embarrassing... I didn't check that option. With this enabled the login works. I'm really sorry for wasting your time!