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

SDK and Viewer fail cryptically when running mismatched versions #2003

Closed
jleibs opened this issue Apr 28, 2023 · 1 comment · Fixed by #2065
Closed

SDK and Viewer fail cryptically when running mismatched versions #2003

jleibs opened this issue Apr 28, 2023 · 1 comment · Fixed by #2065
Assignees
Labels
🪳 bug Something isn't working 🏎️ Quick Issue Can be fixed in a few hours or less

Comments

@jleibs
Copy link
Member

jleibs commented Apr 28, 2023

Trying to use Rust SDK locked at 0.4.0 in conjunction with a viewer installed via cargo install rerun creates a situation where the versions are mismatched.

The client, even with debug logging just tells us it's failing to send the message

[2023-04-28T19:30:14Z DEBUG re_sdk_comms::buffered_client] Connecting to remote 127.0.0.1:9876…
[2023-04-28T19:30:14Z DEBUG re_sdk::session] Beginning new recording with application_id "live-logging" and recording id ad8e43a2-890c-432f-9c30-292815e9e3e3
[2023-04-28T19:30:14Z DEBUG re_sdk_comms::tcp_client] Connecting to [127.0.0.1:9876]…
LogPointReq { x: 0.48031349973549964, y: 0.4630399196363013, z: 0.027025069685679526 }
LogPointReq { x: 0.4215127546877008, y: 0.13105031788011734, z: 0.9674327490678974 }
[2023-04-28T19:30:36Z WARN  re_sdk_comms::buffered_client] Failed to send message: Failed to send to Rerun server at [127.0.0.1:9876]: Broken pipe (os error 32)
[2023-04-28T19:30:36Z DEBUG re_sdk_comms::tcp_client] Connecting to [127.0.0.1:9876]…
LogPointReq { x: 0.0789861976815871, y: 0.22877340514351852, z: 0.4877077198042101 }
[2023-04-28T19:30:37Z WARN  re_sdk_comms::buffered_client] Failed to send message: Failed to send to Rerun server at [127.0.0.1:9876]: Broken pipe (os error 32)

Meanwhile the viewer prints a single error about "bincode" for each attempt.

[2023-04-28T19:30:34Z WARN  re_sdk_comms::server] Closing connection to client: bincode
[2023-04-28T19:30:36Z INFO  re_sdk_comms::server] New SDK client connected: 127.0.0.1:55840
[2023-04-28T19:30:36Z WARN  re_sdk_comms::server] Closing connection to client: bincode
[2023-04-28T19:30:37Z INFO  re_sdk_comms::server] New SDK client connected: 127.0.0.1:55856

Nothing about incompatible versions, etc.

@jleibs jleibs added the 🪳 bug Something isn't working label Apr 28, 2023
@emilk emilk added the 🏎️ Quick Issue Can be fixed in a few hours or less label May 3, 2023
@emilk
Copy link
Member

emilk commented May 9, 2023

The problem is that the SDK comms is not using crates/re_log_encoding/src/encoder.rs, but an ad-hoc encoder in crates/re_sdk_comms/src/lib.rs. We should just unify that.

@emilk emilk self-assigned this May 9, 2023
emilk added a commit that referenced this issue May 9, 2023
This comes with two benefits:
* We get nice error messages on version mismatch
* We get compression of the TCP stream

There is also a downside: we need to pay for the slow zstd encoding
and decoding.

Closes #2003
emilk added a commit that referenced this issue May 9, 2023
…2065)

* Use the same RRD encoding for the SDK comms as for everything else

This comes with two benefits:
* We get nice error messages on version mismatch
* We get compression of the TCP stream

There is also a downside: we need to pay for the slow zstd encoding
and decoding.

Closes #2003

* Use let-else to reduce rightward drift
jprochazk pushed a commit that referenced this issue May 11, 2023
…2065)

* Use the same RRD encoding for the SDK comms as for everything else

This comes with two benefits:
* We get nice error messages on version mismatch
* We get compression of the TCP stream

There is also a downside: we need to pay for the slow zstd encoding
and decoding.

Closes #2003

* Use let-else to reduce rightward drift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🏎️ Quick Issue Can be fixed in a few hours or less
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants