arcadia-unity / Arcadia

Clojure in Unity

Home Page:http://arcadia-unity.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Telnet connection failed with Failed to parse IBObject. Invalid beginning character of object. ...

hww opened this issue · comments

Hello,

With Unity 2021.1.9f1 and 2019.3.15f1 on the Windows 10.
The connection by telnet failed with the error on Unity side, after hit enter with any string include empty.

nrepl: BencodeNET.Exceptions.InvalidBencodeException`1[BencodeNET.Objects.IBObject]: Failed to parse IBObject. Invalid beginning character of object. Found '
' at position 0. Valid characters are: 0-9, 'i', 'l' and 'd'
  at BencodeNET.Parsing.BencodeParser.Parse (BencodeNET.IO.BencodeStream stream) [0x0008f] in <f57c6b848225428ca6216f5cbc1c09fa>:0 
  at BencodeNET.Parsing.BencodeParser.Parse (System.IO.Stream stream) [0x00008] in <f57c6b848225428ca6216f5cbc1c09fa>:0 
  at Arcadia.NRepl+<>c__DisplayClass36_0.<StartServer>b__1 () [0x0007b] in D:\projects\unity\Arcadia_01\Assets\Arcadia\Editor\NRepl.cs:573 
UnityEngine.Debug:LogWarningFormat (string,object[])
Arcadia.NRepl/<>c__DisplayClass36_0:<StartServer>b__1 () (at Assets/Arcadia/Editor/NRepl.cs:630)
System.Threading.ThreadHelper:ThreadStart ()

The manual has the next example of connection

$ telnet localhost 37220
Trying ::1...
Connected to localhost.
Escape character is '^]'.
user=>

On my PC it looks different

v@win:~$ telnet localhost 3722
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

There is not last line with prompt

Just to clarify, IIUC, port 3722 is for nrepl whereas port 37220 is for a socket repl (by default).

IIUC, an nrepl connection doesn't typically give you a prompt and it's not the kind of thing one typically manually interacts with. The expected messages are not the sort of thing one would be typing, nor would the results be things one would read as they use bencode. At least I think this is the case in the context of Arcadia and most other Clojure setups.

Thank You