Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected end of JSON input #640

Closed
Dominique63 opened this issue Jan 8, 2024 · 8 comments
Closed

unexpected end of JSON input #640

Dominique63 opened this issue Jan 8, 2024 · 8 comments
Labels

Comments

@Dominique63
Copy link

Describe the bug

<-- A clear and concise description of what the bug is. -->
Files sent cannot be received (room not ready). On the other hand, croc receives files sent by another machine. Croc has already worked on this computer. Ubuntu 22

To Reproduce

Steps to reproduce the behavior:
<-- 1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error -->

1.croc 2743-clean-river-social
securing channel...2024/01/08 11:46:25 room not ready

Expected behaviour

<-- A clear and concise description of what you expected to happen. -->

Version

<-- Check "croc -v" and report it -->
croc v9.6.0-0e93f1e

Additional context

<-- Add any other context about the problem here. -->
croc --debug
[debug] 11:00:40 cli.go:142: debug mode on
[debug] 11:00:40 croc.go:180: options: {IsSender:false SharedSecret:2684-caesar-imitate-english Debug:true RelayAddress:5.78.91.237:9009 RelayAddress6:[2a01:4ff:1f0:c10b::1]:9009 RelayPorts:[] RelayPassword:pass123 Stdout:false NoPrompt:false NoMultiplexing:false DisableLocal:false OnlyLocal:false IgnoreStdin:false Ask:false SendingText:false NoCompress:false IP: Overwrite:false Curve:p256 HashAlgorithm: ThrottleUpload: ZipFolder:false}
connecting...[debug] 11:00:40 croc.go:682: attempt to discover peers
[debug] 11:00:41 croc.go:747: discoveries: []
[debug] 11:00:41 croc.go:748: establishing connection
[debug] 11:00:41 croc.go:764: got host '2a01:4ff:1f0:c10b::1' and port '9009'
[debug] 11:00:41 croc.go:766: trying connection to [2a01:4ff:1f0:c10b::1]:9009
[debug] 11:00:41 comm.go:55: dialing to [2a01:4ff:1f0:c10b::1]:9009 with timelimit 200ms
[debug] 11:00:41 comm.go:64: connected to '[2a01:4ff:1f0:c10b::1]:9009'
[debug] 11:00:41 tcp.go:475: strong key: 747b023d45fd3fef2f166d80f065e5d54c543ec3f5b6eafb173a6b4406323e72
[debug] 11:00:41 tcp.go:489: sending password
[debug] 11:00:41 tcp.go:500: waiting for first ok
[debug] 11:00:41 tcp.go:518: sending room
[debug] 11:00:41 tcp.go:529: waiting for room confirmation
[debug] 11:00:41 tcp.go:545: all set
[debug] 11:00:41 croc.go:779: receiver connection established: &{connection:0xc00009a000}
[debug] 11:00:41 croc.go:780: banner: 9010,9011,9012,9013
[debug] 11:00:41 croc.go:785: sending ips?
[debug] 11:00:41 croc.go:794: ips data:
[debug] 11:00:41 croc.go:797: ips unmarshal error: invalid character '\x01' looking for beginning of value
[debug] 11:00:41 croc.go:848: exchanged header message
securing channel...[debug] 11:00:41 croc.go:866: ready
[debug] 11:00:41 message.go:61: writing pake message (unencrypted)
[debug] 11:00:42 compress.go:50: error copying data: unexpected EOF
[debug] 11:00:42 croc.go:1218: problem with decoding: unexpected end of JSON input
[debug] 11:00:42 croc.go:892: got error processing: problem with decoding: unexpected end of JSON input
[debug] 11:00:42 croc.go:946: error: problem with decoding: unexpected end of JSON input
2024/01/08 11:00:42 room not ready

@Dominique63 Dominique63 added the bug label Jan 8, 2024
@X64X2
Copy link

X64X2 commented Jan 9, 2024

Beep boop

@schollz
Copy link
Owner

schollz commented Jan 9, 2024

upgrade to the latest version and try please

@Dominique63
Copy link
Author

Hi, thank you for your message. I thought I had the latest version.
I installed the new version but it doesn't work either...
croc version v9.6.6-1e57206
ufw status : inactif
croc version v9.6.6-1e57206
croc --debug
[debug] 10:29:14 cli.go:149: debug mode on
[debug] 10:29:14 croc.go:185: options: {IsSender:false SharedSecret:2684-caesar-imitate-english Debug:true RelayAddress:5.78.91.237:9009 RelayAddress6:[2a01:4ff:1f0:c10b::1]:9009 RelayPorts:[] RelayPassword:pass123 Stdout:false NoPrompt:false NoMultiplexing:false DisableLocal:false OnlyLocal:false IgnoreStdin:false Ask:false SendingText:false NoCompress:false IP: Overwrite:false Curve:p256 HashAlgorithm: ThrottleUpload: ZipFolder:false TestFlag:false GitIgnore:false}
connecting...[debug] 10:29:14 croc.go:785: attempt to discover peers
[debug] 10:29:14 croc.go:850: discoveries: []
[debug] 10:29:14 croc.go:851: establishing connection
[debug] 10:29:14 croc.go:867: got host '2a01:4ff:1f0:c10b::1' and port '9009'
[debug] 10:29:14 croc.go:869: trying connection to [2a01:4ff:1f0:c10b::1]:9009
[debug] 10:29:14 comm.go:78: dialing to [2a01:4ff:1f0:c10b::1]:9009 with timelimit 200ms
[debug] 10:29:15 comm.go:87: connected to '[2a01:4ff:1f0:c10b::1]:9009'
[debug] 10:29:15 tcp.go:476: strong key: 496fb0b6ff898247f39ecacbb8c1b22fed30b037896f8107784f16e1a16566cc
[debug] 10:29:15 tcp.go:490: sending password
[debug] 10:29:15 tcp.go:501: waiting for first ok
[debug] 10:29:15 tcp.go:519: sending room
[debug] 10:29:15 tcp.go:530: waiting for room confirmation
[debug] 10:29:15 tcp.go:546: all set
[debug] 10:29:15 croc.go:882: receiver connection established: &{connection:0xc00009c068}
[debug] 10:29:15 croc.go:883: banner: 9010,9011,9012,9013
[debug] 10:29:15 croc.go:891: sending ips?
[debug] 10:29:15 croc.go:900: ips data:
[debug] 10:29:15 croc.go:903: ips unmarshal error: invalid character '\x01' looking for beginning of value
[debug] 10:29:15 croc.go:956: exchanged header message
securing channel...[debug] 10:29:15 croc.go:974: ready
[debug] 10:29:15 message.go:61: writing pake message (unencrypted)
[debug] 10:29:16 compress.go:50: error copying data: unexpected EOF
[debug] 10:29:16 croc.go:1326: problem with decoding: unexpected end of JSON input
[debug] 10:29:16 croc.go:1000: got error processing: problem with decoding: unexpected end of JSON input
[debug] 10:29:16 croc.go:1054: error: problem with decoding: unexpected end of JSON input
2024/01/10 10:29:16 room not ready

@schollz
Copy link
Owner

schollz commented Jan 10, 2024

room not ready means the sender hasn't initiated. did you initiate sender first?

@Dominique63
Copy link
Author

I'm not sure I understand.
I did this:
dominique@dominique-AcerAspire:~$ croc send dictionnary.cfg
Sending 'dictionnary.cfg' (1.0 MB)
Code is: 5677-fuel-venice-plato
On the other computer run

croc 5677-fuel-venice-plato

dominique@dominique-AcerAspire:~$ croc 5677-fuel-venice-plato
securing channel...2024/01/10 16:07:49 room not ready

@schollz
Copy link
Owner

schollz commented Jan 10, 2024

very strange, lets keep this open. I can't replicate it but maybe something will come up.

have you tried on any other pair of computers?

@Dominique63
Copy link
Author

I tried on another machine. Unfortunately I have another error message:
connecting...2024/01/11 11:24:18 could not connect to 5.161.69.143:9009: comm.NewConnection failed: dial tcp 5.161.69.143:9009: i/o timeout
So I didn't insist.
I specify that I test sending AND receiving on the same computer.

@YHYJ
Copy link

YHYJ commented May 23, 2024

v9.6.17 also has this error, default and self hosted

@schollz schollz closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants