seafdav icon indicating copy to clipboard operation
seafdav copied to clipboard

ERROR : PUT: byte copy failed -- Upload of MOV files via WebDAV not possible.

Open christianbur opened this issue 6 months ago • 2 comments

Describe the bug I use https://www.photosync-app.com to backup my photos and videos from my iPhone. I initially used Nextcloud with Webdav (no problems) and have now switched to Seafile. I can upload all photos using Webdav without any problems, but no live photos and videos, both use MOV files. Why is it not possible to upload MOV files? I use haproxy as a load balancer for https, however, the problem also occurs with http without proxy (the proxy is not the problem). I use Seafile with Docker (image: seafileltd/seafile-mc:latest)

similar error: https://forum.seafile.com/t/webdav-upload-big-files/4546

./seafile/conf/seafdav.conf INFO: Tested with "fastcgi = true" and without

[WEBDAV]
enabled = true
port = 8080
fastcgi = true
share_name = /seafdav

./seafile/logs/seafdav.log

18:24:28.175 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:28] "OPTIONS /Bilder" length=0, elap=0.018sec -> 200 OK
18:24:28.227 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:28] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.018sec -> 405 Method Not Allowed
18:24:28.300 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:28] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.065sec -> 405 Method Not Allowed
18:24:28.740 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:28] "PROPFIND /Bilder/iPhone15Pro-CB/Zuletzt/" length=0, depth=1, elap=0.427sec -> 207 Multi-Status
18:24:29.634 - ERROR   : PUT: byte copy failed
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 837, in do_PUT
    fileobj.writelines(data_stream)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 686, in _stream_data_chunked
    length = int(buf, 16)
ValueError: invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x00-l\xb0mdaty\x00m\x00[\x00G\x005\x00\'\x00\x17\x00\x00\x00\xec\xff\xda\xff\xcc\xff\xbc\xff\xa6\xff\x9e\xff\x96\xff\x8f\xff\x95\xff\
18:24:29.635 - ERROR   : Caught HTTPRequestException(HTTP_INTERNAL_ERROR)
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 837, in do_PUT
    fileobj.writelines(data_stream)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 686, in _stream_data_chunked
    length = int(buf, 16)
ValueError: invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x00-l\xb0mdaty\x00m\x00[\x00G\x005\x00\'\x00\x17\x00\x00\x00\xec\xff\xda\xff\xcc\xff\xbc\xff\xa6\xff\x9e\xff\x96\xff\x8f\xff\x95\xff\

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/error_printer.py", line 50, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_resolver.py", line 224, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 127, in __call__
    app_iter = provider.custom_request_handler(environ, start_response, method)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/dav_provider.py", line 1594, in custom_request_handler
    return default_handler(environ, start_response)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 847, in do_PUT
    util.fail(e)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/util.py", line 949, in fail
    raise e
wsgidav.dav_error.DAVError: 500

18:24:29.635 - ERROR   : e.src_exception:
invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x00-l\xb0mdaty\x00m\x00[\x00G\x005\x00\'\x00\x17\x00\x00\x00\xec\xff\xda\xff\xcc\xff\xbc\xff\xa6\xff\x9e\xff\x96\xff\x8f\xff\x95\xff\
18:24:29.635 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:29] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3298.MOV" elap=0.150sec -> 500 Internal Server Error
18:24:56.925 - INFO    : 172.23.10.2 - (anonymous) - [2023-11-23 17:24:56] "OPTIONS /Bilder" length=0, elap=0.000sec -> 401 Not Authorized
18:24:56.956 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:56] "OPTIONS /Bilder" length=0, elap=0.013sec -> 200 OK
18:24:57.004 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:57] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.014sec -> 405 Method Not Allowed
18:24:57.040 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:57] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.031sec -> 405 Method Not Allowed
18:24:57.442 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:57] "PROPFIND /Bilder/iPhone15Pro-CB/Zuletzt/" length=0, depth=1, elap=0.390sec -> 207 Multi-Status
18:24:58.248 - ERROR   : PUT: byte copy failed
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 837, in do_PUT
    fileobj.writelines(data_stream)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 686, in _stream_data_chunked
    length = int(buf, 16)
ValueError: invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x007\x86\x1fmdat\xa3\xfdH\x04R\n'
18:24:58.248 - ERROR   : Caught HTTPRequestException(HTTP_INTERNAL_ERROR)
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 837, in do_PUT
    fileobj.writelines(data_stream)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 686, in _stream_data_chunked
    length = int(buf, 16)
ValueError: invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x007\x86\x1fmdat\xa3\xfdH\x04R\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/error_printer.py", line 50, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_resolver.py", line 224, in __call__
    for v in app_iter:
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 127, in __call__
    app_iter = provider.custom_request_handler(environ, start_response, method)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/dav_provider.py", line 1594, in custom_request_handler
    return default_handler(environ, start_response)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/request_server.py", line 847, in do_PUT
    util.fail(e)
  File "/opt/seafile/seafile-server-11.0.2/seahub/thirdpart/wsgidav/util.py", line 949, in fail
    raise e
wsgidav.dav_error.DAVError: 500

18:24:58.248 - ERROR   : e.src_exception:
invalid literal for int() with base 16: b'\x00\x00\x00\x14ftypqt  \x00\x00\x00\x00qt  \x00\x00\x00\x08wide\x007\x86\x1fmdat\xa3\xfdH\x04R\n'
18:24:58.249 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:24:58] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3292.MOV" elap=0.121sec -> 500 Internal Server Error
18:25:08.910 - INFO    : 172.23.10.2 - (anonymous) - [2023-11-23 17:25:08] "OPTIONS /Bilder" length=0, elap=0.000sec -> 401 Not Authorized
18:25:08.940 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:08] "OPTIONS /Bilder" length=0, elap=0.013sec -> 200 OK
18:25:08.995 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:08] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.016sec -> 405 Method Not Allowed
18:25:09.030 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:09] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.030sec -> 405 Method Not Allowed
18:25:09.473 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:09] "PROPFIND /Bilder/iPhone15Pro-CB/Zuletzt/" length=0, depth=1, elap=0.433sec -> 207 Multi-Status
18:25:11.583 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:11] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3284.HEIC" length=12701583, elap=1.396sec -> 201 Created
18:25:11.674 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:11] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.012sec -> 405 Method Not Allowed
18:25:11.711 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:11] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.033sec -> 405 Method Not Allowed
18:25:13.216 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:13] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3283.HEIC" length=12899412, elap=1.493sec -> 201 Created
18:25:13.296 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:13] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.013sec -> 405 Method Not Allowed
18:25:13.344 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:13] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.044sec -> 405 Method Not Allowed
18:25:13.934 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:13] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3282.HEIC" length=3366078, elap=0.568sec -> 201 Created
18:25:14.013 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:14] "MKCOL /Bilder/iPhone15Pro-CB" length=0, depth=0, elap=0.014sec -> 405 Method Not Allowed
18:25:14.060 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:14] "MKCOL /Bilder/iPhone15Pro-CB/Zuletzt" length=0, depth=0, elap=0.042sec -> 405 Method Not Allowed
18:25:14.613 - INFO    : 172.23.10.2 - [email protected] - [2023-11-23 17:25:14] "PUT /Bilder/iPhone15Pro-CB/Zuletzt/IMG_3281.HEIC" length=3338018, elap=0.531sec -> 201 Created

To Reproduce Steps to reproduce the behavior:

  1. install Sefile with docker (https://manual.seafile.com/docker/deploy_seafile_with_docker/)
  2. enable webdav https://manual.seafile.com/extension/webdav/
  3. Upload photos with https://www.photosync-app.com/de/index

Expected behavior That not only pictures but also videos (mov files) can be uploaded via Webdav.

Screenshots, Log-Files, Stacktrace ..

Environment: docker

christianbur avatar Dec 17 '23 23:12 christianbur