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

Fetch data example frequently panics after root lookup #2

Open
cpswan opened this issue Jun 20, 2023 · 0 comments
Open

Fetch data example frequently panics after root lookup #2

cpswan opened this issue Jun 20, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@cpswan
Copy link
Member

cpswan commented Jun 20, 2023

Describe the bug

RUST_LOG=info cargo run --example fetch_data_example ~/.atsign/keys/@cpswan_key.atKeys cpswan bareindoornetball
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
warning: the following packages contain code that will be rejected by a future version of Rust: rustc-serialize v0.3.24
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
     Running `target/debug/examples/fetch_data_example '/home/chris/.atsign/keys/@cpswan_key.atKeys' cpswan bareindoornetball`
[2023-06-20T11:34:42Z INFO  at_rust::at_secrets] Extracting keys from file
[2023-06-20T11:34:42Z INFO  at_rust::at_secrets] Decoding keys
[2023-06-20T11:34:42Z INFO  at_rust::at_secrets] Keys decoded and decrypted
[2023-06-20T11:34:42Z INFO  at_rust::at_client] Getting at sign server address
[2023-06-20T11:34:43Z INFO  at_rust::at_tls_client] Connected to AtServerAddr { host: "root.atsign.org", port: 64 }
[2023-06-20T11:34:43Z INFO  at_rust::at_tls_client] Sending: cpswan
[2023-06-20T11:34:44Z INFO  at_rust::at_tls_client] Received: @
[2023-06-20T11:34:44Z INFO  at_rust::at_tls_client] Closing connection
[2023-06-20T11:34:44Z INFO  at_rust::at_client] At server address:
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', src/at_client.rs:188:16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Steps to reproduce

  1. First I run RUST_LOG=info cargo run --example fetch_data_example ~/.atsign/keys/@cpswan_key.atKeys cpswan bareindoornetball
  2. Then I see the error message above quite often

Expected behavior

Client should be more resilient, and retry with exponential backoff until a configurable number of attempts has failed.

@cpswan cpswan added the bug Something isn't working label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants