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

sync example panicing with "already subscribed" #1451

Closed
b5 opened this issue Sep 5, 2023 · 0 comments · Fixed by #1452
Closed

sync example panicing with "already subscribed" #1451

b5 opened this issue Sep 5, 2023 · 0 comments · Fixed by #1452
Labels
bug Something isn't working _c-iroh-legacy Formerly big iroh node with all protocols _c-iroh-sync

Comments

@b5
Copy link
Member

b5 commented Sep 5, 2023

@divagant-martian & I have both replicated this. I was running main branch, commit 4ef3611

Error:

thread 'main' panicked at 'already subscribed', iroh/examples/sync.rs:277:38

to replicate run:

cargo run --example sync --features="example-sync" -- open x

Full output:

$ export RUST_BACKTRACE=1
b5 at number-0 in ~/code/iroh (main)
$ cargo run --example sync --features="example-sync" -- open foo
    Finished dev [unoptimized + debuginfo] target(s) in 0.20s
     Running `target/debug/examples/sync open foo`
> our secret key: j37vi7ntiitnhnrqqqt5mpd7o3vjti44yqywxhdo6gc4zd4o67ba
> using DERP servers: https://derp.iroh.network./, https://eu1.derp.iroh.network./
> our peer id: yrquuqsvrn5atzkcdwby43hiiomz3nuby7n4472hu3im3qpkfwia
> opening document foo as namespace atqlw…uq and waiting for peers to join us...
> ticket to join us: atqlwoptbmnd724j6u3mso7bkbkuqlpxjbtuwagsnznhk53xaluqcigemffeevmlpie6kqq5qohgz2cdtgo3naoh3phh6r5g2dg4d2rnsadqasczeaq33dadadakqrbzxwgagagavbcevpmmamasmacaifjxj2aaaaaaaaaaaaianuwbamasmacaifjxj2aaaaaaaaaaaaibfuwbamasmacaifjxj2aaaaaaaaaaaaibhuwbamasmacaifjxj2aaaaaaaaaaaaibluwbamaqc
> storage directory: "/var/folders/3z/8gpmzsnd5sd7stqq9z5n0v040000gn/T/iroh-sync-yrquuqsvrn5atzkcdwby43hiiomz3nuby7n4472hu3im3qpkfwia"
> opening doc yne55…cq
> ready to accept commands
> type `help` for a list of commands
thread 'main' panicked at 'already subscribed', iroh/examples/sync.rs:274:38
stack backtrace:
>>    0: rust_begin_unwind
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14
   2: core::panicking::panic_display
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:150:5
   3: core::panicking::panic_str
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:134:5
   4: core::option::expect_failed
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/option.rs:1952:5
   5: core::option::Option<T>::expect
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/option.rs:898:21
   6: sync::run::{{closure}}
             at ./iroh/examples/sync.rs:274:22
   7: sync::main::{{closure}}
             at ./iroh/examples/sync.rs:94:15
   8: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
             at /Users/b5/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/park.rs:282:63
   9: tokio::runtime::coop::with_budget
             at /Users/b5/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/coop.rs:107:5
  10: tokio::runtime::coop::budget
             at /Users/b5/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/coop.rs:73:5
  11: tokio::runtime::park::CachedParkThread::block_on
             at /Users/b5/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/park.rs:282:31
  12: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
             at /Users/b5/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/context/blocking.rs:66:9
  13: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
             at /Users/b5/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/multi_thread/mod.rs:87:13
  14: tokio::runtime::context::runtime::enter_runtime
             at /Users/b5/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/context/runtime.rs:65:16
  15: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
             at /Users/b5/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
  16: tokio::runtime::runtime::Runtime::block_on
             at /Users/b5/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/runtime/runtime.rs:349:45
  17: sync::main
             at ./iroh/examples/sync.rs:94:5
  18: core::ops::function::FnOnce::call_once
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@b5 b5 added bug Something isn't working _c-iroh-legacy Formerly big iroh node with all protocols _c-iroh-sync labels Sep 5, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog - unassigned issues in iroh Sep 5, 2023
github-merge-queue bot pushed a commit that referenced this issue Sep 5, 2023
## Description

The sync example uses the low level API, and was using an outdated call.

Fixes #1451
@github-project-automation github-project-automation bot moved this from 📋 Backlog - unassigned issues to ✅ Done in iroh Sep 5, 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 _c-iroh-legacy Formerly big iroh node with all protocols _c-iroh-sync
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant