mantono / giss

List GitHub issues from the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime'

McPringle opened this issue · comments

steps to reproduce:

$> git clone https://github.com/mantono/giss.git
$> cd giss
$> cargo build --release
$> cargo install --path .
$> giss -t <token> -p <target>

error output:

thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /Users/mcpringle/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/context.rs:37:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error output with backtrace:

thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /Users/mcpringle/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/context.rs:37:26
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: std::thread::local::LocalKey<T>::with
   4: tokio::time::driver::sleep::sleep
   5: reqwest::async_impl::client::Client::execute_request
   6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   7: giss::cfg::Config::username
   8: giss::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error output with full backtrace:

thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /Users/mcpringle/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/context.rs:37:26
stack backtrace:
   0:        0x1029587f8 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9955000502fddd8a
   1:        0x1027962f0 - core::fmt::write::hd6aaffe828fad50f
   2:        0x1029583d0 - std::io::Write::write_fmt::h8939db9f062fb6a9
   3:        0x102970244 - std::panicking::default_hook::{{closure}}::h22d061fa0f32cbb9
   4:        0x102970cd0 - std::panicking::rust_panic_with_hook::h407c595b7d5fe810
   5:        0x102958f60 - std::panicking::begin_panic_handler::{{closure}}::h30e79c173368ea82
   6:        0x102958edc - std::sys_common::backtrace::__rust_end_short_backtrace::h32e9f151e3ac3ee4
   7:        0x10296f24c - _rust_begin_unwind
   8:        0x1029a0f78 - core::panicking::panic_fmt::h45d7d06dcdf49d9e
   9:        0x1029a0a9c - core::option::expect_failed::had6358d68d2f5317
  10:        0x10297b3b0 - std::thread::local::LocalKey<T>::with::h2399b9fbabd3f28d
  11:        0x10297c56c - tokio::time::driver::sleep::sleep::hc81bda48feda0ea8
  12:        0x1028e7ea4 - reqwest::async_impl::client::Client::execute_request::hb369a2a491851b94
  13:        0x1027e5788 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h732f0181056a4c84
  14:        0x1027e1e60 - giss::cfg::Config::username::h289ec684b6ac94e3
  15:        0x1027cc2fc - giss::main::hc6400c1935958372
  16:        0x1027d38b8 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8dff2e5cadc484d1
  17:        0x1027caf54 - _main

versions:

cargo 1.51.0
rustc 1.51.0
macOS Big Sur 11.3.1

Thank you for your report! I will look into this. @McPringle Is this reproducible 100% of the times you do this?

I am able to reproduce this issue as well if I remove my previously resolved usernames, so it is not a Mac OS specific issue. I think I know what causes this. Hopefully I can fix this in the coming days.

Yes, every time I run this command. I'm a Java developer and have no idea of how tokio is related to cargo and rust, but I found two discussions in different projects which seems to be related to this problem:

And now the most interesting one I found (about half page down):

@McPringle The issue should have been fixed now, but please let me know if you still see an issue with this, or any other issue. Thank you for bringing this to my attention. Have a nice weekend!

@mantono Thank you very much for your really fast fix, I can confirm that it works! Even on a MacBook with an M1 arm processor… :-)