nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.3k stars 1.77k forks source link

The nextcloud android app cannot handle domain name + port correctly. #14038

Open Zieng opened 2 days ago

Zieng commented 2 days ago

⚠️ Before posting ⚠️

Steps to reproduce

Background

My ISP does provide me with public ip and does not allow me to use port 80 and port 443, so I need to enable port forwarding to make nextcloud work. I will forward the port 16443 to 443 port of my machine.

I have bound the domain name my_domain_name.com to the ip of my router.

How to produce

  1. When open the nextcloud android app, fill the server address with https://my_domain_name.com:16443, and confirm.
  2. The server can be connected and there is a page that give you a huge login button. click the button to login.
  3. Fill you username and password in the login page, and confirm.
  4. The login can't be completed because of net::ERR_CONNECTION_ABORTED error.

From the error page, I can see it's connecting using https://my_domain_name.com/login instead of https://my_domain_name.com:16443/login, so it can't reach my sever, and failed to login.

Expected behaviour

I expect the nextcloud can use the correct domain name with port

Actual behaviour

The nextcloud drops the port and only use the domain name.

Android version

Android 15

Device brand and model

One Plus 13

Stock or custom OS?

Custom (explain in "additional information")

Nextcloud android app version

3.29.2

Nextcloud server version

29.0.8.1

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

Additional information

No response

joshtrichards commented 21 hours ago

In all likelihood this is a configuration matter involving your reverse proxy configuration and/or your overwritehost config value:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#overwritehost https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#overwrite-parameters

And, depending on the nature of the reverse proxy setup, there may also be some errors/warnings under Administration settings->overview.