HelloZeroNet/ZeroNet · error · AnnounceError
Unknown protocol: %s
Error message
Unknown protocol: %s
What it means
Dispatch error in SiteAnnouncer.announceTracker: getTrackerHandler returned no handler for address_parts['protocol'], meaning the tracker URL uses a scheme the announcer does not implement (e.g. a typo'd or unsupported protocol string). The input at fault is the tracker address's protocol part.
Source
Thrown at src/Site/SiteAnnouncer.py:203
last_status = self.stats[tracker]["status"]
self.stats[tracker]["status"] = "announcing"
self.stats[tracker]["time_request"] = time.time()
global_stats[tracker]["time_request"] = time.time()
if config.verbose:
self.site.log.debug("Tracker announcing to %s (mode: %s)" % (tracker, mode))
if mode == "update":
num_want = 10
else:
num_want = 30
handler = self.getTrackerHandler(address_parts["protocol"])
error = None
try:
if handler:
peers = handler(address_parts["address"], mode=mode, num_want=num_want)
else:
raise AnnounceError("Unknown protocol: %s" % address_parts["protocol"])
except Exception as err:
self.site.log.warning("Tracker %s announce failed: %s in mode %s" % (tracker, Debug.formatException(err), mode))
error = err
if error:
self.stats[tracker]["status"] = "error"
self.stats[tracker]["time_status"] = time.time()
self.stats[tracker]["last_error"] = str(error)
self.stats[tracker]["time_last_error"] = time.time()
if self.site.connection_server.has_internet:
self.stats[tracker]["num_error"] += 1
self.stats[tracker]["num_request"] += 1
global_stats[tracker]["num_request"] += 1
if self.site.connection_server.has_internet:
global_stats[tracker]["num_error"] += 1
self.updateWebsocket(tracker="error")
return False
View on GitHub (pinned to 454c0b2e7e)
Solutions
- Use only supported tracker protocols (http/https/udp) in trackers.json
- Skip trackers with unknown protocols and continue announcing to the remaining trackers
- Catch the error per-tracker so one bad tracker address does not abort the whole announce loop
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/Site/SiteAnnouncer.py:203 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HelloZeroNet/ZeroNet@454c0b2e7e (2026-09-02).
Data as JSON: /api/errors/c0ff5a63c67cc4a7.
Report an issue: GitHub.