nextcloud_ynh icon indicating copy to clipboard operation
nextcloud_ynh copied to clipboard

.well-known broken after update

Open MCMic opened this issue 1 year ago • 6 comments

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

  • Hardware: Old laptop or computer
  • YunoHost version: 11.0.9
  • I have access to my server: Through SSH | through the webadmin | direct access via keyboard / screen | ...
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using, or trying to install package version/branch: master
  • If upgrading, current package version: 24.0.4~ynh1

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.

MCMic avatar Sep 02 '22 21:09 MCMic