HelloZeroNet/ZeroNet · error · AnnounceError
Invalid response: %s
Error message
Invalid response: %s
What it means
AnnounceZeroPlugin announces to a zero:// (ZeroNet-based) tracker peer via request("announce", request). If the reply is falsy or lacks a "peers" key, it raises AnnounceError("Invalid response: %s"). The tracker connection worked but its reply didn't contain the expected peers list.
Source
Thrown at plugins/AnnounceZero/AnnounceZeroPlugin.py:104
# Tracker can remove sites that we don't announce
if full_announce:
request["delete"] = True
# Sent request to tracker
tracker_peer = connection_pool.get(tracker_address) # Re-use tracker connection if possible
if not tracker_peer:
tracker_ip, tracker_port = tracker_address.rsplit(":", 1)
tracker_peer = Peer(str(tracker_ip), int(tracker_port), connection_server=self.site.connection_server)
tracker_peer.is_tracker_connection = True
connection_pool[tracker_address] = tracker_peer
res = tracker_peer.request("announce", request)
if not res or "peers" not in res:
if full_announce:
time_full_announced[tracker_address] = 0
raise AnnounceError("Invalid response: %s" % res)
# Add peers from response to site
site_index = 0
peers_added = 0
for site_res in res["peers"]:
site = sites[site_index]
peers_added += processPeerRes(tracker_address, site, site_res)
site_index += 1
# Check if we need to sign prove the onion addresses
if "onion_sign_this" in res:
self.site.log.debug("Signing %s for %s to add %s onions" % (res["onion_sign_this"], tracker_address, len(sites)))
request["onion_signs"] = {}
request["onion_sign_this"] = res["onion_sign_this"]
request["need_num"] = 0
for site in sites:
onion = self.site.connection_server.tor_manager.getOnion(site.address)
publickey = self.site.connection_server.tor_manager.getPublickey(onion)View on GitHub (pinned to 454c0b2e7e)
Solutions
- Inspect the %s value — None means request timeout, a dict may reveal the tracker's error reason.
- Retry; time_full_announced is reset to 0 so a full announce happens again on the next cycle.
- Update ZeroNet/this tracker plugin — protocol mismatches between versions cause missing "peers" keys.
- Remove unreachable zero trackers from the tracker list.
- Verify network/Tor connectivity to the tracker peer.
Example fix
// before
if not res or "peers" not in res:
raise AnnounceError("Invalid response: %s" % res)
// after
if not res or "peers" not in res:
self.site.log.warning("Zero tracker %s bad response: %s" % (tracker_address, res))
return [] Defensive patterns
Strategy: retry
Try / catch
try:
peers = announce_plugin.announceTrackerZero(tracker_address, file_info, *args)
except AnnounceError as e:
log.warning("Zero tracker %s: %s" % (tracker_address, e))
# next full announce cycle retries automatically Prevention
- Keep ZeroNet and tracker plugins updated to the same protocol version
- Retry announces periodically; failures reset time_full_announced
- Ping trackers (request ping) before announcing to prune dead ones
- Maintain several zero trackers in the tracker list
When it happens
Trigger: The zero tracker returns None on request timeout, an error dict, or a response missing "peers" because the tracker rejected the site or is an incompatible/old tracker version.
Common situations: ZeroNet tracker peers running outdated software; trackers offline (request returns None after timeout); announced site not supported by that tracker; Tor-connected trackers dropping the request.
Related errors
- No response after %.0fs
- Invalid response: %r
- Could not connect
- Invalid response: %r (%s)
- Announce onion address to failed: %s
AI-assisted analysis of HelloZeroNet/ZeroNet@454c0b2e7e (2026-09-02).
Data as JSON: /api/errors/314ea984127b3d72.
Report an issue: GitHub.