viofosync icon indicating copy to clipboard operation
viofosync copied to clipboard

Incorrect file sizes; failure to complete download

Open acheslow opened this issue 5 months ago • 6 comments

While doing some troubleshooting on a different issue I stopped the viofosync container, deleted the config/viofosync.db, connected the dashcam to my home network, and restarted the viofosync container.

Viofosync started downloading the file /DCIM/Movie/2026_0628_133416_104430R.MP4

The viofosync file listing showed the file size as 56.0MB but the download progress showed it as 60.0MB, and the dashcam's web page shows it as 714.00MB.

Image Image

Viofosync ending up downloading the full 714MB, displaying it as 1190% downloaded.

However, it then restarted downloading the same file from the beginning again.

The docker log showed:

026-06-28 13:57:38,666 WARNING viofosync_lib.protocol: Incomplete download of 2026_0628_133416_104430R.MP4: 714.0 MB/60.0 MB

Camera: A229 Plus 3-channel Firmeware: VIOFO_A229S_V1.5_260330;V1.3.1_250421

acheslow avatar Jun 28 '26 21:06 acheslow

Just as an fyi after pulling the dev release I get this error:

ERROR: Exception in ASGI application

Traceback (most recent call last):

File "/usr/local/lib/python3.12/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 239, in run_asgi

result = await self.app(self.scope, self.asgi_receive, self.asgi_send)  # type: ignore[func-returns-value]

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in call

return await self.app(scope, receive, send)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.12/site-packages/fastapi/applications.py", line 1159, in call

await super().__call__(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/starlette/applications.py", line 107, in call

await self.middleware_stack(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 151, in call

await self.app(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/starlette/middleware/base.py", line 103, in call

await self.app(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in call

await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

raise exc

File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app

await app(scope, receive, sender)

File "/usr/local/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call

await self.app(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 716, in call

await self.middleware_stack(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 736, in app

await route.handle(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 364, in handle

await self.app(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 160, in app

await wrap_app_handling_exceptions(app, session)(scope, receive, send)

File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

raise exc

File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app

await app(scope, receive, sender)

File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 157, in app

await func(session)

File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 764, in app

await dependant.call(**solved_result.values)

File "/web/routers/progress.py", line 49, in progress

await ws.receive_text()

File "/usr/local/lib/python3.12/site-packages/starlette/websockets.py", line 118, in receive_text

raise RuntimeError('WebSocket is not connected. Need to call "accept" first.')

RuntimeError: WebSocket is not connected. Need to call "accept" first.

acheslow avatar Jul 04 '26 16:07 acheslow

Thanks for reporting. Should be fixed in the new dev image.

RobXYZ avatar Jul 06 '26 08:07 RobXYZ

Hi, I was never able to get this working. It is still just downloading a single file each time. I am getting the following error:

ERROR asyncio Exception in callback <bound method Loop.add_writer of <uvloop.Loop running=True closed=False debug=False>> handle: Traceback (most recent call last): File "uvloop/loop.pyx", line 840, in uvloop.loop.Loop._add_writer KeyError: 13

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "uvloop/cbhandles.pyx", line 63, in uvloop.loop.Handle._run File "uvloop/loop.pyx", line 2469, in uvloop.loop.Loop.add_writer File "uvloop/loop.pyx", line 842, in uvloop.loop.Loop._add_writer File "uvloop/handles/poll.pyx", line 29, in uvloop.loop.UVPoll.new File "uvloop/handles/poll.pyx", line 17, in uvloop.loop.UVPoll._init OSError: [Errno 9] Bad file descriptor

acheslow avatar Aug 13 '26 15:08 acheslow

Is it the same file each time or a different single file?

Could you share the info level logs from under the logs tab?

RobXYZ avatar Aug 13 '26 19:08 RobXYZ

Each day shows one done, and the rest as either pending, failed, or gone.

Image

Here are the latest info logs:

viofo.log

acheslow avatar Aug 13 '26 22:08 acheslow

Thanks for the logs. There was a second issues with NFS missed in the last fix.

This should be working now in the new release.

RobXYZ avatar Aug 14 '26 15:08 RobXYZ