schollz/croc

panic: cipher: message authentication failed

Opened this issue · 5 comments

  • I'm transferring a ~150MB file between two computers on my network, a VM and a real machine.
  • The VM is on NAT, so I believe the file is being sent via the Internet (judging by the transfer speed).
  • After about 25%, I get the error: panic: cipher: message authentication failed
  • This was working about an hour ago, so maybe there's an issue with the web server?

Receiver:
Screenshot_ubuntu-24 10_2024-11-12_20:22:39

Sender:

Sending 'synergy-linux-noble_x64-.deb' (133.1 MB)
Code is: ***********

On the other computer run:
(For Windows)
    croc ***********
(For Linux/OSX)
    CROC_SECRET="***********" croc 

Sending (->145.40.148.208:59846)
synergy-linux-nob...  98% |███████████████████ | (138/140 MB, 83 MB/s) [1s:0s]2024/11/12 20:22:08 EOF

how many times has this happened?

Within the timespan of about 5 mins, it happened about 3 or 4 times. I haven't seen it before, and I'm not seeing it now. I'm assuming this is a transient error.

Edit: I'm using a custom code with --code... I wonder if that's related?

Ah, it happened again today. Tried again 10 mins later and it works fine. Very intermittent.

Receiver:

panic: cipher: message authentication failed

I'm really not sure what causes it. If nobody else is reporting issues with the Croc servers, then maybe it's something related to my default VM NAT configuration.

I also saw this on the sender, but I can't remember if I ctrl+C'd croc on the receiver so it might be a red herring:

connection.Write failed: write tcp 192.168.0.217:37998->5.78.91.237:9017: write: connection reset by peer

goroutine 106 [running]:
github.com/schollz/croc/v10/src/croc.(*Client).sendData(0xc0000ea000, 0x7)
	/home/runner/work/croc/croc/src/croc/croc.go:2091 +0x727
created by github.com/schollz/croc/v10/src/croc.(*Client).updateState in goroutine 30
	/home/runner/work/croc/croc/src/croc/croc.go:1920 +0x6dc

connection secure?

connection secure?

Could you elaborate?