This report involves two nodes, one running v1.1 where the latest known identity document version is 1, and the other running 34014a67b0ddc859d95e17ffc71c1ae61aff5758, where it is 2. I’ll abbreviate their node IDs with “node1” and “node2” correspondingly. I’ll also abbreviate the RID of the repo with “rid”.
On a node running v1.1, I try to clone a repository with an identity document at version 2.
$ rad clone –seed node2 rid ✗ Fetching rad:z3saZHZtaqFXoPn4n46rMwpZ19nGd from node2.. error: failed to perform fetch handshake ✗ Error: repository rad:z3saZHZtaqFXoPn4n46rMwpZ19nGd not found
While it is okay for this to fail, the particular reason, i.e., that an unsupported identity document version was found, is not communicated back to the user.
On the node itself, the logs are not very helpful either:
INFO service Received command Fetch(rid, node2)
DEBUG service Fetch initiated for rid with node2 [outbound persistent connected] (all remotes)..
DEBUG wire Opened new stream with id 20 for rid and remote node2
DEBUG worker Worker processing outgoing fetch for rid
DEBUG worker node1 cloning from node2
DEBUG wire Received close command for stream 20 from node2
DEBUG wire Stream 20 of node2 closed with 0 byte(s) sent and 0 byte(s) received
WARN fetch Failed to perform handshake: An IO error occurred when talking to the server
DEBUG wire Received fetch result from worker for stream 20, remote node2: Initiator { rid, result: Err(Fetch(Run(Handshake { err: Custom { kind: Other, error: Transport(Io(Kind(ConnectionReset))) } }))) }
DEBUG service Found existing fetch request from node2, sending result..
DEBUG service Sent fetch result for rid from node2..
ERROR service Fetch failed for rid from node2: failed to perform fetch handshake
2
Funnily enough, the log on v2, which is not the one trying to fetch, is more insightful:
INFO wire Peer node1 failed to fetch rid from us: json: unknown identity document version 2, only version 1 is supported at line 1 column 323 ERROR wire Peer id=23 (fd=28) disconnected
This issue is primarily about supplying a better error message in this case.