milan-fabian / slideshow-support

Support and issue tracking for Slideshow software
https://slideshow.digital/
14 stars 1 forks source link

Webdav owncloud vs. nextcloud #44

Closed skar-cgn closed 1 year ago

skar-cgn commented 1 year ago

Hi all, I used the app with owncloud as webdav remote file storage and automatic file sync which worked fine as expected. Due to the EOL of PHP <8.x the switch to nextcloud was needed. But now the file sync is not working anymore. It always returns a 503 status code even other clients connect perfectly with the same data. Tested with two different Nextcloud installations (two different provider).

Here is the log:

2023-06-06 23:38:37 INFO sk.mimac.slideshow.database.dao.GrabberDao - Edited grabber data '/test'
2023-06-06 23:38:43 WARN sk.mimac.slideshow.downloader.FileGrabber - Can't download file from 'webdav://https://USERNAME:PW@nextclouddomain.com/remote.php/dav/files/USERNAME': com.thegrizzlylabs.sardineandroid.impl.SardineException: Error contacting https://nextclouddomain.com/remote.php/dav/files/USERNAME (503 Service Unavailable)
2023-06-06 23:38:43 INFO sk.mimac.slideshow.downloader.FileGrabber - File grabber for id=5 finished in 0 seconds, statistics: filesDownloaded=0, filesSkipped=0, filesNotChanged=0, filesFailed=1, downloadedBytes=0

Any hints how to fix this ? I could provide a nextcloud testlogin if needed.

Thanks in advance Regards Ralf

milan-fabian commented 1 year ago

@skar-cgn Hello Ralf,

Error code 503 Service Unavailable usually indicates a problem on the server's side, either a maintenance downtime or an internal error. Is there any way for you to check the server logs?

What happens if you open https://USERNAME:PW@nextclouddomain.com/remote.php/dav/files/USERNAME in your browser (with the actual values)?

If you don't get any hints from server logs or browser, you can send us a test login to slideshow@slideshow.digital, we will have a look at it.

skar-cgn commented 1 year ago

Thanks for the quick response. Other clients via webdav and also the webclient are working fine. But in the same second only slideshow is not able to connect. You can create your own temporarly test account on the offical page, but this one is only valid for 60min. But this could help to check, that it is not an isuue with my personal instance. I get the same error with such a demo account. https://try.nextcloud.com/

I will also send you an invite to my personal Nextcloud instance to test it in the next minutes.

Regards Ralf

milan-fabian commented 1 year ago

@skar-cgn I checked it, but we will need you help with checking the Nextcloud logs. We are always getting server error 503 without any description, there should be more details in the Nextcloud logs.

You can for example check the request at 2023-06-09 12:57:11 Central European time.

milan-fabian commented 1 year ago

@skar-cgn I checked it one more time, apparently @ sign in the username is handled differently by Nextcloud than by Slideshow. If there is some way for you to test login without any special characters in the username or password, you can try it.

The fix for special characters will be in the next version of Slideshow.

skar-cgn commented 1 year ago

Hi @milan-fabian, thanks for testing. I am sorry to disapppoint you, but I just checked with username and password free off special characters. Only numbers and letters. The result is still the same. Here the response from the access.log

89.0.xxx.xxx - - [11/Jun/2023:22:27:36 +0200] "PROPFIND /remote.php/dav/files/xxxxx HTTP/1.1" 401 6081 "-" "Slideshow/4.4.4 Dalvik/2.1.0 (Linux; U; Android 12; Lenovo YT-J706X Build/SP1A.210812.016)" subdomain.domain.tl 89.0.xxx.xxx - - [11/Jun/2023:22:27:37 +0200] "PROPFIND /remote.php/dav/files/xxxxx HTTP/1.1" 503 1439 "-" "Slideshow/4.4.4 Dalvik/2.1.0 (Linux; U; Android 12; Lenovo YT-J706X Build/SP1A.210812.016)" subdomain.domain.tl

Somehow only the slideshow client generates this 503 error, other clients are working fine. I just created a new testuser for you without any special char in the username.

Regards Ralf

milan-fabian commented 1 year ago

@skar-cgn One more try, please go to Slideshow's web interface - menu Settings - Device settings, set User agent for HTTP requests to WebDAVFS and try the synchronization again.

NextCloud seems to be really picky about the WebDAV client.

skar-cgn commented 1 year ago

Wow, I am super impressed. Never thought that the user agent could be the issue. It is working perfectly now.

As I can not help with coding, I would offer to write a documentation page on webdav file sync for the homepage if this helps.

milan-fabian commented 1 year ago

@skar-cgn Thank you for the feedback, I am happy to hear it helped :)

We will prepare some fixes in the next version of Slideshow, so all these "hacks" for Nextcloud wouldn't be necessary. I will let you know once this version is ready, afterwards we would really appreciate your help with the documentation.

milan-fabian commented 1 year ago

@skar-cgn We just released Slideshow 4.5.2 which should support WebDAV connection to Nextcloud from out of the box (https://slideshow.digital/version-history/).

If you have some time, I would appreciate it if you could confirm it. Documentation page would be much appreciated as well :)