YunoHost-Apps / nextcloud_ynh

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

Nextcloud’s Gestion app is not working #627

Closed Thatoo closed 1 year ago

Thatoo commented 1 year ago

My YunoHost server

Hardware: Old laptop or computer YunoHost version: 11.2.4 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 If your request is related to an app, specify its name and version: Nextcloud 27.0.2~ynh1 Description of my issue

I’m trying to use the Gestion app in Nextcloud, https://apps.nextcloud.com/apps/gestion 4, without success. It doesn’t display as it should (I have tried this app on an other nextcloud not based on Yunohost) and I get plenty of error in the firefox console :

405
Uncaught ReferenceError: showError is not defined
Source map errors

Does anyone manage to install Gestion in Nextcloud?

I opened an issue on github to talk about it Sadly, nothing works.. [object Object] error · Issue #360 · baimard/gestion · GitHub 1

I tried on a fresh install of Yunohost and Nextcloud.

I think it is linked to nginx reverse proxy but I don’t know what test I could make to find the solution. I’m afraid that if I face this issue with this nextcloud app, it might happen for others.

After reading these two pages :

[405 Method Not Allowed - HTTP | MDN](https://developer.mozilla.org/fr/docs/Web/HTTP/Status/405)
[Résoudre les problèmes d’applications WEB API2 qui fonctionnent dans Visual Studio et échouent sur un serveur IIS de production | Microsoft Learn](https://learn.microsoft.com/fr-fr/aspnet/web-api/overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications)

it looks like PROPFIND and PROPPATCH , which are two methods used with WebDAV, and they are used to query or set properties for a URI, are not yet handle by yunohost nextcloud nginx conf.

Any idea what I should do to try to make it working?

Thatoo commented 1 year ago

The solution was given by tituspijean. Thanks to him.

Edit /etc/nginx/conf.d/<nextcloud domain>.d/nextcloud.conf to have on line 138 if ($request_method ~ ^(PUT|DELETE|PATCH|PROPFIND|PROPPATCH)$) { instead of if ($request_method ~ ^(PUT|DELETE|PATCH)$) {

then

$sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
$ sudo service nginx reload

and it works.

I'll make a PR for that.