croc icon indicating copy to clipboard operation
croc copied to clipboard

Trying to send a file with `--local` fails with `found no addresses to connect`

Open DUOLabs333 opened this issue 2 years ago • 17 comments

Describe the bug

I'm trying to send a file between two devices on the LAN. To try to boost the speed, I send with --local. However, when trying to connect, it fails with

[debug]    17:54:45 croc.go:561: attempt to discover peers
[debug] 17:54:45 croc.go:626: discoveries: []
[debug] 17:54:45 croc.go:627: establishing connection
[debug] 17:54:45 croc.go:655: could not connect to : found no addresses to connect
2022/01/09 17:54:45 could not connect to : found no addresses to connect 

To Reproduce

Steps to reproduce the behavior:

  1. Send file with croc --local send <file>
  2. On the other device, try to recieve with `croc --local
  3. See error

Expected behaviour

There should be no error.

Version

This is between a Windows machine and Arch Linux ARM, both with croc version v9.5.0-f210ef8

Additional context

DUOLabs333 avatar Jan 09 '22 23:01 DUOLabs333

Can you try again with the latest version?

schollz avatar Apr 05 '22 12:04 schollz

The problem seems to be resolved.

DUOLabs333 avatar Apr 05 '22 13:04 DUOLabs333

This is happening again with Android phone sending to Arch Linux computer.

DUOLabs333 avatar Jun 14 '22 16:06 DUOLabs333

Which version and which environment are you usinf

schollz avatar Jun 14 '22 19:06 schollz

Both are v9.5.6.

DUOLabs333 avatar Jun 14 '22 19:06 DUOLabs333

Sending from Linux to Android works fine, though.

DUOLabs333 avatar Jun 14 '22 20:06 DUOLabs333

I also got this error on v9.5.6-b7e4a73, on macOS. I tried:

croc --local .

# on the same computer
croc --local xxx

NightMachinery avatar Jun 16 '22 13:06 NightMachinery

Please run with --debug and report the output

schollz avatar Jun 16 '22 13:06 schollz

This is happening sending from Windows (9.6.0) to Arch (9.5.6):

[debug] 12:37:46 cli.go:141: debug mode on
[debug] 12:37:46 croc.go:178: options: {IsSender:false SharedSecret:Hello333 Debug:true RelayAddress:5.161.69.143:9009 RelayAddress6:[2a01:4ff:f0:23c2::14c:1]:9009 RelayPorts:[] RelayPassword:pass123 Stdout:false NoPrompt:false NoMultiplexing:false DisableLocal:false OnlyLocal:true IgnoreStdin:false Ask:false SendingText:false NoCompress:false IP: Overwrite:false Curve:p256 HashAlgorithm: ThrottleUpload:}
connecting...[debug]    12:37:46 croc.go:648: attempt to discover peers
[debug] 12:37:46 croc.go:713: discoveries: []
[debug] 12:37:46 croc.go:714: establishing connection
[debug] 12:37:46 croc.go:742: could not connect to : found no addresses to connect

DUOLabs333 avatar Jul 29 '22 16:07 DUOLabs333

Hi so my question is I installed croc in android using termux it works fine but since i'm running out from data i wanted to send a 2 gb file to my laptop so i figured out that i can use croc with the --local so i made i made a hotpost without internet from my phone and connected it to my laptop and shared normally from my phone using the local but it gives me the same error So my question is the thing i was doing supposed to work in the first place or not

beh-10257 avatar Aug 27 '22 12:08 beh-10257

@beheeddinekhelil What command are you using to send the file?

stefins avatar Aug 27 '22 13:08 stefins

@stefins croc --local send --code anyway1234 fgbhct.blend For sending

croc anyway1234 For receiving

The error is Found no address to connect

Remember the laptop is connected to a connection without internet sice i turned off the mobile data before trying to transfer the file

Btw in the two devices the version of croc is 9.6.0-0e93f1e I guess the latest

beh-10257 avatar Aug 27 '22 13:08 beh-10257

@beheeddinekhelil Have you tried sending with internet on( for peer discovery)? Then also if it's not working try to host a local relay on your device and send through it!

stefins avatar Aug 27 '22 13:08 stefins

@stefins it works fine when the internet is on without the --local option

  • Isn't hosting my own relay requires mobile data
  • How to receive from that local relay is it always the same Like "croc anyway01234" per exemple

beh-10257 avatar Aug 27 '22 13:08 beh-10257

it works fine when the internet is on without the --local option

This is for peer discovery not for actual data transmission

Isn't hosting my own relay requires mobile data

No

How to receive from that local relay is it always the same

You have to specify the relay flag for both send and receive command like croc --relay "myrelay.example.com:9009" send [filename]

stefins avatar Aug 27 '22 13:08 stefins

@stefins so when I keep the internet on but with the --locale option it sais in the receive device That the room is not ready

Btw can i open a relay with the locale option

beh-10257 avatar Aug 27 '22 14:08 beh-10257

Btw can i open a relay with the locale option

no you have to run croc relay and you have to mention your local ip as the --relay argument

stefins avatar Aug 27 '22 16:08 stefins

Croc --local still doesn't work using the same computer with internet on image If you need any info, just tell me

Guarmanda avatar Feb 23 '23 11:02 Guarmanda