DioxusLabs/dioxus · error

Could not receive a socket - the devtools could not boot - t

Error message

Could not receive a socket - the devtools could not boot - the port is likely already in use

What it means

The dev server's select loop could not obtain a socket from a devtools connection: the devtools failed to boot, most likely because the hot-reload port is already bound by another process. The socket stream yielded None, so hot-reload connections cannot be established.

Source

Thrown at packages/cli/src/serve/server.rs:156

            .hot_reload_sockets
            .iter_mut()
            .enumerate()
            .map(|(idx, socket)| async move { (idx, socket.socket.next().await) })
            .collect::<FuturesUnordered<_>>();

        tokio::select! {
            new_hot_reload_socket = &mut new_hot_reload_socket => {
                if let Some(new_socket) = new_hot_reload_socket {
                    let aslr_reference = new_socket.aslr_reference;
                    let pid = new_socket.pid;
                    let id = new_socket.build_id.unwrap_or(BuildId::PRIMARY);

                    drop(new_message);
                    self.hot_reload_sockets.push(new_socket);

                    return ServeUpdate::NewConnection { aslr_reference, id, pid };
                } else {
                    panic!("Could not receive a socket - the devtools could not boot - the port is likely already in use");
                }
            }
            new_build_status_socket = &mut new_build_status_socket => {
                if let Some(mut new_socket) = new_build_status_socket {
                    drop(new_message);

                    // Update the socket with project info and current build status
                    let project_info = SharedStatus::new(Status::ClientInit { application_name: self.application_name.clone(), bundle: self.bundle });
                    if project_info.send_to(&mut new_socket.socket).await.is_ok() {
                        _ = self.build_status.send_to(&mut new_socket.socket).await;
                        self.build_status_sockets.push(new_socket);
                    }
                    return future::pending::<ServeUpdate>().await;
                } else {
                    panic!("Could not receive a socket - the devtools could not boot - the port is likely already in use");
                }
            }
            Some((idx, message)) = new_message.next() => {

View on GitHub (pinned to 24f6a829df)

Solutions

  1. Another process (usually a previous dx serve) holds the devtools port. Stop it or start dx with a different port.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/cli/src/serve/server.rs:156 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23). Data as JSON: /api/errors/28bb05b8a500bc19. Report an issue: GitHub.