[GH-ISSUE #985] crash when starting librespot, with error: 'thread 'main' panicked at 'called Result::unwrap() on an Err value: DNSError(Unknown)'' #476

Closed
opened 2026-02-27 19:30:52 +03:00 by kerem · 1 comment
Owner

Originally created by @Sveske-Juice on GitHub (Apr 18, 2022).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/985

When i start librespot it crashes, with error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: DNSError(Unknown)', discovery/src/lib.rs:115:18

The command used to start the server:

$ librespot -n "Librespot server" --backend pulseaudio

Originally created by @Sveske-Juice on GitHub (Apr 18, 2022). Original GitHub issue: https://github.com/librespot-org/librespot/issues/985 When i start librespot it crashes, with error: ``thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: DNSError(Unknown)', discovery/src/lib.rs:115:18`` The command used to start the server: `$ librespot -n "Librespot server" --backend pulseaudio`
kerem closed this issue 2026-02-27 19:30:52 +03:00
Author
Owner

@Sveske-Juice commented on GitHub (Apr 18, 2022):

Hi i found a solution to the problem. I will try to explain but keep in mind i'm not quite sure it's correct. Librespot uses mDNS/DNS-SD to broadcast to the local network that the server is here and it is running. That way the spotify client can easily can see the server. The main problem occurs when it needs to broadcast it's existence, and because the avahi daemon in my case wasn't running it couldn't broadcast, resulting in crashing.

fix:
Make sure avahi is installed and running as a service

example using archlinux with systemd:
$ sudo systemctl enable avahi-daemon

<!-- gh-comment-id:1101608951 --> @Sveske-Juice commented on GitHub (Apr 18, 2022): Hi i found a solution to the problem. I will try to explain but keep in mind i'm not quite sure it's correct. Librespot uses mDNS/DNS-SD to broadcast to the local network that the server is here and it is running. That way the spotify client can easily can see the server. The main problem occurs when it needs to broadcast it's existence, and because the avahi daemon in my case wasn't running it couldn't broadcast, resulting in crashing. fix: Make sure avahi is installed and running as a service example using archlinux with systemd: `$ sudo systemctl enable avahi-daemon`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#476
No description provided.