Tokio: 'Cannot start a runtime from within a runtime' / 'there is no reactor running'
@devsingh05▲ 10 net votes
The first comes from calling block_on (or a #[tokio::main] function) inside code already running on Tokio; await the future instead, or use tokio::task::spawn_blocking for sync code. The second means async code that needs Tokio (timers, sockets, reqwest) ran outside any runtime, for example from a plain main or another executor; start it under #[tokio::main] or a Runtime.