Receiving a file with `wormhole` CLI fails at end although the transferred file is complete
wuan opened this issue · comments
Andreas Würl commented
When transferring a file from the Destiny app to the wormhole CLI there is an error on the receiving side although the file has been transmitted successfully.
This is the output of the wormhole CLI:
Receiving (->relay:tcp:relay.mw.leastauthority.com:4001)..
1.19MB [00:00, 3.71MB/s]
Traceback (most recent call last):
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/internet/defer.py", line 857, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/internet/defer.py", line 1750, in gotResult
current_context.run(_inlineCallbacks, r, gen, status)
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/internet/defer.py", line 1656, in _inlineCallbacks
result = current_context.run(
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/python/failure.py", line 514, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
--- <exception caught here> ---
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/wormhole/cli/cli.py", line 122, in _dispatch_command
yield maybeDeferred(command)
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/internet/defer.py", line 1656, in _inlineCallbacks
result = current_context.run(
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/python/failure.py", line 514, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/wormhole/cli/cmd_receive.py", line 120, in go
yield d
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/internet/defer.py", line 1656, in _inlineCallbacks
result = current_context.run(
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/python/failure.py", line 514, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/wormhole/cli/cmd_receive.py", line 187, in _go
yield self._parse_offer(them_d[u"offer"], w)
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/internet/defer.py", line 1656, in _inlineCallbacks
result = current_context.run(
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/python/failure.py", line 514, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/wormhole/cli/cmd_receive.py", line 277, in _parse_offer
datahash = yield self._transfer_data(rp, f)
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
result = current_context.run(gen.send, result)
File "/opt/homebrew/Cellar/magic-wormhole/0.12.0_7/libexec/lib/python3.10/site-packages/wormhole/cli/cmd_receive.py", line 420, in _transfer_data
assert received == self.xfersize
builtins.AssertionError:
ERROR:
The file does already exist, but with a .tmp
suffix:
It has the same size and is identical to the source file:
% ls -la 11FE*
-rw-r--r--@ 1 x staff 1193071 Nov 25 10:15 11FE82F5-E406-46C4-8BDB-1AC76CCF712E.jpeg
-rw-r--r-- 1 x staff 1193071 Nov 25 10:12 11FE82F5-E406-46C4-8BDB-1AC76CCF712E.jpeg.tmp
Running a diff yields that those files are identical.
This is working with the current release version 1.0.1, but not with what we currently have on the main
branch.
Andreas Würl commented
That seems to be related to an unintended update of dart_wormhole_william
. Will revert that.