android
android copied to clipboard
[BUG] 500 error when trying to share files via the app
Actual behaviour
When clicking on the "share" icon, an error message is shown on the android app, indicating a bad server configuration. This only occurs when using the app, not when using the browser on the PC.
Server log line (access via android app): 79.218.242.141 - michael [28/May/2021:22:18:32 +0200] "GET /owncl/ocs/v2.php/apps/files_sharing/api/v1/shares?path=%2FownCloud%20Manual.pdf&reshares=true&subfiles=false HTTP/1.1" 500 1151 "-" "Mozilla/5.0 (Android) ownCloud-android/2.18"
Server log line (access via Firefox browser): 79.218.242.141 - - [28/May/2021:22:19:04 +0200] "GET /owncl/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2FownCloud%20Manual.pdf&reshares=true HTTP/1.1" 200 896 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"
Expected behaviour
The Android app should behave like the Firefox browser.
Unfortunately, the server error 500 code does not indicate the cause of the error.
What is the server version you're running?
It is 10.7.0 (2021-03-26).
Hi ! I have the same issue. It is possible to share with other users using the web page, however the Android app says there is a bad server configuration. Did you find a solution for that @mizapf @michaelstingl ?
Running ownCloud 10.8.0 (stable) on raspbian
Not sure where to look, but I'm happy to provide all the details you need.
I did not try again; will do in a couple of days.
Hi Michael, have you any news regarding this issue? Thanks Just found this similar issue (closed). Will let you know if this solved my problem.
upgrading owncloud to 10.9.1 did not solve the problem. The issue I mentioned above suggests downgrading files_sharing to version 0.13.0 as a solution. How can I do that ? Thanks
This is a piece of the android app log, with what I identify as the response to my trying to share a file with another user
E: 2022-02-17 19:25:00:273(GetRemoteSharesForFileOperation.kt:101) .onResultUnsuccessful()Failed response while while getting remote shares for file operation E: 2022-02-17 19:25:00:274(GetRemoteSharesForFileOperation.kt:103) .onResultUnsuccessful()*** status code: 500; response message: {"ocs":{"meta":{"status":"failure","statuscode":500,"message":"CSRF check failed","totalitems":"","itemsperpage":""},"data":[]}} D: 2022-02-17 19:25:00:274(ViewModelExt.kt:98) $runUseCaseWithResultAndUseCachedData.invokeSuspend()Use case executed: RefreshSharesFromServerAsyncUseCase with result: Error(throwable=com.owncloud.android.domain.exceptions.InstanceNotConfiguredException)
Could you check this -> https://central.owncloud.org/t/csrf-check-failed-when-trying-to-share-files/29991/24
Tell us if it helps to fix.
Could you check this -> https://central.owncloud.org/t/csrf-check-failed-when-trying-to-share-files/29991/24
Tell us if it helps to fix.
I had also this error and was waiting for a bugfix. Tried this, didn't work. But after more searching I found this: https://github.com/owncloud/core/issues/38287#issuecomment-1012520522 It solved the problem for me, so it is possible to share with the android app again.
My owncloud server runs on Debian 11, ownCloud 10.10.0 (stable), ssl enabled.
That means, the root problem is not in Android client. Then we could close this one
In the official documentation to configure ownCloud with Apache, there is described something similar: Configure Apache for Manual Installation on Linux I tried this too: and it is still working :-) It might be there are some tutorials in the web with missing of this part or it was not required earlier. I installed my ownCloud instance back in 2014 version 7 And sharing with the android client was always possible... until... I don't know exactly... last year or so
Hi there. Thanks for the replies. I found a solution in the end although that was ~6 months ago, so I do not remember the details. Judging by my apache2 virtualhost config, it was similar to what @gtxe suggested 👍
That means, the root problem is not in Android client. Then we could close this one
I think the name of the issue is clear. The bug may be due to server configuration, but it manifests via the app, not because of the app. In any case, there seems to be a viable workaround now, so I guess this issue could indeed be closed?
I had also this error and was waiting for a bugfix. Tried this, didn't work. But after more searching I found this: owncloud/core#38287 (comment) It solved the problem for me, so it is possible to share with the android app again.
Adding the AllowOverride and RewriteEngine has solved the issue for me as well. Thanks!
Verified that this is fixed via: https://github.com/owncloud/core/issues/38287#issuecomment-1012520522