-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0 byte TUS upload results in an 500 error #3154
Comments
Related to owncloud/client#9324 |
Is the client using tus or chunked uploads? |
PropagateUploadFileTUS |
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Retested with testpilotcloud-2.10.0-rc3 (build 6437) and ocis.ocis-traefik.released.owncloud.works.
Result: this time no error about authentication, only message "Server replied "500 Internal Server error..."
|
It seems to have something to do with the content-type header. This request results in a 500 server error
This one without the content-type header works
|
Hm after debugging a bit it seems to have something to do with our changes regarding zero byte file uploads: cs3org/reva#2309 The file is never actually being written and in the end when we try to stat the uploaded file it fails because it wasn't created... Needs more debugging |
So the issue is that TUS expects that a 0 byte upload is finished early. See this line: https://github.com/tus/tusd/blob/0d781500f958e2d69098bc485aa2575f23ee3270/pkg/handler/unrouted_handler.go#L406 But when we are uploading a file we aren't actually using the TUS handler, instead we have our own handler which is initiating a new upload. https://github.com/cs3org/reva/blob/d217886c962b05ab7aa751923016e3ccb4dd7534/internal/http/services/owncloud/ocdav/tus.go#L195 Then we call the datatx handler for the actual upload. https://github.com/cs3org/reva/blob/d217886c962b05ab7aa751923016e3ccb4dd7534/internal/http/services/owncloud/ocdav/tus.go#L242 Since this is a patch request we end up in this handler which ends prematurely for 0 byte uploads. https://github.com/tus/tusd/blob/0d781500f958e2d69098bc485aa2575f23ee3270/pkg/handler/unrouted_handler.go#L540-L544 I think a possible solution could be to call |
@C0rby TouchFile is the best solution IMO, the EOS driver implemented it some weeks ago. |
This comment was marked as resolved.
This comment was marked as resolved.
Retested with testpilotcloud 3.0.0.7819-daily20220617 (on openSUSE 15.3 / VFS off) and oCIS 2.0.0-beta.4+ba9a48a51 (docker) Steps done:
Result: file isn't synced, 'Not Synced' tab shows "500 Internal Server Error"
|
With the same test setup as above ( testpilotcloud 3.0.0.7819-daily20220617, oCIS 2.0.0-beta.4+ba9a48a51) the server also replies the 500 internal error now when trying to upload a non empty file (TextFile.txt, 16 bytes) to 'Personal'. Uploading a small file was successful before with earlier versions of client and oCIS.
|
This comment was marked as outdated.
This comment was marked as outdated.
Uploading a non empty file to ocis.ocis-traefik.released.owncloud.works (Beta3) using testpilotcloud 3.0.0.7819-daily20220617 works without error. |
Another logfile from a test with testpilotcloud 3.0.0.7819-daily20220617, oCIS 2.0.0-beta.4+ba9a48a51 and file with 0 byte (the file created in 'dolphin' in #3154 (comment) has in fact 2 bytes).
|
Appears to be an unrelated issue, works fine with the traefik example. |
-> this logging is for download of a 0 byte file ... but same error for POST |
Confirmed fixed with ocis.ocis-traefik.released.owncloud.works productversion: "2.0.0-beta.4" (client: ownCloud-3.0.0-daily20220628.7878.x64.msi): |
Hi guys. However, I just receive the same issue with 0 byte transfers in the current ownCloud ocis server (4.0) which I run as a docker container and with the 4.2 Linux Desktop client on Fedora. Any suggestions on how to fix it? |
Here the log of the upload.
Seen with ownCloud-2.10.0-rc3.
Steps to reproduce:
Result:
Client shows a red error message "Host requires authentication" for a while, then the 'i' and message is shown in 'Not synced' tab.
20220105_1143_owncloud.log.0.gz
20220105_1142_owncloud.log.2.gz
20220105_1142_owncloud.log.1.gz
20220105_1142_owncloud.log.0.gz
20220105_1059_owncloud.log.0.gz
Download of files works.
The text was updated successfully, but these errors were encountered: