tahoe-lafs / magic-folder

Tahoe-LAFS-based file synchronization
Other
26 stars 7 forks source link

Unhandled `AttributeError` in `mark_conflict` #728

Open crwood opened 1 year ago

crwood commented 1 year ago

I am currently joined to a magic-folder with multiple participants that contains a conflicted file (running the latest Magic-Folder release from PyPI -- 23.5.0). Occasionally -- and at seemingly random intervals spanning anywhere between 30 minutes and 3 hours -- I've observed the following traceback printed to magic-folders stdout:

2023-05-30T13:26:11-0400 Unhandled Error
Traceback (most recent call last):
  File "magic_folder/cli.py", line 1175, in _entry
  File "twisted/internet/task.py", line 961, in react
  File "twisted/internet/base.py", line 1318, in run
  File "twisted/internet/base.py", line 1328, in mainLoop
--- <exception caught here> ---
  File "twisted/internet/base.py", line 994, in runUntilCurrent
  File "automat/_methodical.py", line 242, in _download_mismatch
  File "automat/_methodical.py", line 281, in __call__
  File "magic_folder/magic_file.py", line 852, in _mark_download_conflict
  File "magic_folder/downloader.py", line 413, in mark_conflict
builtins.AttributeError: 'NoneType' object has no attribute 'moveTo'

I'm not entirely sure which behaviors are triggering this error, as it occurs independently of any direct actions that I take and I don't see anything relating to this in the eliot logs (which I'm happy to provide over a secure channel).

meejah commented 1 year ago

I see an "XXX" comment in that function about deletes -- is it possible the file that is conflicted has also been deleted?

meejah commented 1 year ago

(...or maybe that it was deleted at some point, and then later became conflicted somehow?)