croc icon indicating copy to clipboard operation
croc copied to clipboard

[Bug]: croc fails transferring files from Termux to Ubuntu VPS

Open farsighter opened this issue 4 weeks ago • 0 comments

What happened?

croc consistently fails when sending files from Termux (Android) to a Ubuntu VPS.

It seems the transfer fails during secure channel setup as you can see in the attached log. IPv4 relay connection succeeds Failure happens after PAKE begins, during secure channel setup Stream ends unexpectedly (unexpected EOF)

This appears to be Termux / Android–specific.

Environment

Sender

  • Xiaomi Poco F6 Android 15 (mobile + WiFi tested)
  • Termux 0.119.0-beta.3
  • croc 10.3.1 Installed via pkg install croc
  • Battery optimization disabled, termux-wake-lock enabled

Receiver

  • Ubuntu 20.04.4 LTS, amd64
  • croc 10.3.1
  • Public IPv4

What did you expect to happen?

I expected a successful file transfer.

Steps to reproduce

Sender: croc send file Receiver: CROC_SECRET="code" croc

croc version

10.3.1

Operating System

Other (please specify in additional context)

OS Version

Android 15

Relevant log output

root@rack:~/test# CROC_SECRET="6458-bamboo-camilla-kayak" croc --debug
[debug] 00:49:20 cli.go:233: debug mode on
[debug] 00:49:20 cli.go:237: public IP address: <PUBLIC_IPV4>
connecting...
[debug] 00:49:20 croc.go:898: attempt to discover peers
[debug] 00:49:21 croc.go:964: discoveries: []
[debug] 00:49:21 croc.go:965: establishing connection
[debug] 00:49:21 croc.go:981: got host '<PUBLIC_IPV6>' and port '9009'
[debug] 00:49:21 croc.go:983: trying connection to [<PUBLIC_IPV6>]:9009
[debug] 00:49:21 comm.go:78: dialing to [<PUBLIC_IPV6>]:9009 with timelimit 200ms
[debug] 00:49:21 comm.go:83: comm.NewConnection failed: dial tcp [<PUBLIC_IPV6>]:9009: connect: network is unreachable
[debug] 00:49:21 tcp.go:493: comm.NewConnection failed: dial tcp [<PUBLIC_IPV6>]:9009: connect: network is unreachable
[debug] 00:49:21 croc.go:989: could not establish '[<PUBLIC_IPV6>]:9009'
[debug] 00:49:21 croc.go:981: got host '<PUBLIC_IPV4>' and port '9009'
[debug] 00:49:21 croc.go:983: trying connection to <PUBLIC_IPV4>:9009
[debug] 00:49:21 comm.go:78: dialing to <PUBLIC_IPV4>:9009 with timelimit 5s
[debug] 00:49:21 comm.go:87: connected to '<PUBLIC_IPV4>:9009'
[debug] 00:49:21 tcp.go:523: strong key: 21796a1fcd96e51dd0bb1e52f8a4f47f4e706ae14b3daf9a602dbb785fcb6852
[debug] 00:49:21 tcp.go:537: sending password
[debug] 00:49:21 tcp.go:548: waiting for first ok
[debug] 00:49:21 tcp.go:566: sending room; e59e95b322f759a75b58a9075aa43fc89153d543d440677a4caf2c6f6f7944c4
[debug] 00:49:21 tcp.go:577: waiting for room confirmation
[debug] 00:49:21 tcp.go:593: all set
[debug] 00:49:21 croc.go:996: receiver connection established: &{connection:0xc000050000}
[debug] 00:49:21 croc.go:997: banner: 9010,9011,9012,9013,9014,9015,9016,9017
[debug] 00:49:21 croc.go:1028: data:
[debug] 00:49:21 croc.go:1117: exchanged header message
securing channel...
[debug] 00:49:21 croc.go:1135: ready
[debug] 00:49:21 message.go:61: writing pake message (unencrypted)
[debug] 00:49:22 compress.go:50: error copying data: unexpected EOF
[debug] 00:49:22 croc.go:1506: problem with decoding: unexpected end of JSON input
[debug] 00:49:22 croc.go:1161: data:
[debug] 00:49:22 croc.go:1162: got error processing: problem with decoding: unexpected end of JSON input
[debug] 00:49:22 croc.go:1216: error: problem with decoding: unexpected end of JSON input
room (secure channel) not ready, maybe peer disconnected

Additional context

No response

farsighter avatar Dec 18 '25 00:12 farsighter