YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
147 stars 64 forks source link

.well-known broken after update #503

Open MCMic opened 2 years ago

MCMic commented 2 years ago

Describe the bug

.well-known path are detected as handled by another app while there are not. So the app removes the well-known part from config.

Context

Steps to reproduce

When updating from 22 to the current one, I saw the warning saying another app is handling ./.well-known paths. Because of this, the .well-known paths were removed from nginx config. I think they were handled by nextcloud, looking at the log:

2022-09-02 13:46:24,807: DEBUG - ++ curl --insecure --silent --output /dev/null --write-out '%{http_code};%{redirect_url}' https://127.0.0.1/.well-known/caldav --header 'Host: ***MYDOMAIN***' --resolve ***MYDOMAIN***:443:127.0.0.1
2022-09-02 13:46:25,886: DEBUG - + local 'curl_output=301;https://***MYDOMAIN***/nextcloud/remote.php/dav/'
2022-09-02 13:46:25,887: DEBUG - + local http_code=301
2022-09-02 13:46:25,887: DEBUG - + local redirection=https://***MYDOMAIN***/nextcloud/remote.php/dav/
2022-09-02 13:46:25,888: DEBUG - + '[' 301 = 404 ']'
2022-09-02 13:46:25,888: DEBUG - + [[ https://***MYDOMAIN***/nextcloud/remote.php/dav/ =~ /yunohost/admin ]]
2022-09-02 13:46:25,889: DEBUG - + [[ https://***MYDOMAIN***/nextcloud/remote.php/dav/ =~ /yunohost/sso ]]
2022-09-02 13:46:25,889: DEBUG - + ynh_print_warn '--message=Another app already uses the domain ***MYDOMAIN*** to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book.'
2022-09-02 13:46:25,889: DEBUG - + local legacy_args=m
2022-09-02 13:46:25,890: DEBUG - + args_array=(['m']='message=')
2022-09-02 13:46:25,890: DEBUG - + local -A args_array
2022-09-02 13:46:25,890: DEBUG - + local message
2022-09-02 13:46:25,891: DEBUG - + ynh_handle_getopts_args '--message=Another app already uses the domain ***MYDOMAIN*** to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book.'
2022-09-02 13:46:25,891: DEBUG - + set +o xtrace
2022-09-02 13:46:25,910: DEBUG - + ynh_print_log 'Another app already uses the domain ***MYDOMAIN*** to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book.'
2022-09-02 13:46:25,911: DEBUG - + echo -e 'Another app already uses the domain ***MYDOMAIN*** to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book.'
2022-09-02 13:46:25,911: DEBUG - + sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' ../conf/nginx.conf
2022-09-02 13:46:25,913: WARNING - Another app already uses the domain ***MYDOMAIN*** to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book.

Expected behavior

.well-known redirections in the nginx configuration and no warning in Nextcloud admin page.

OniriCorpe commented 1 year ago

I have a 404 on my .well-known, so I guess I have the same problem

tituspijean commented 1 year ago

Can you both confirm no other app has a ./well-known path or permission?

OniriCorpe commented 1 year ago

I confirm, I've only Nextcloud installed on this domain name

(Also this bug breaks the automatic CardDav/CalDav configuration for clients)

OniriCorpe commented 9 months ago

always there in v28.0.1

silverhook commented 8 months ago

Just upgraded to 28.0.3 and this popped up in my Nextcloud:

Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation ↗. Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation ↗.

It seemed to work fine in 28.0.2 though.

tio-trom commented 6 months ago

Same here

Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the [documentation ↗](https://docs.nextcloud.com/server/28/go.php?to=admin-setup-well-known-URL).
Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the [documentation ↗](https://docs.nextcloud.com/server/28/go.php?to=admin-setup-well-known-URL).

It has been like this for a few versions for me.

https://files.trom.tf/index.php/.well-known/carddav