{"record":{"id":"314ea984127b3d72","repo":"HelloZeroNet/ZeroNet","slug":"invalid-response-s","errorCode":null,"errorMessage":"Invalid response: %s","messagePattern":"Invalid response: (.+?)","errorType":"exception","errorClass":"AnnounceError","httpStatus":null,"severity":"error","filePath":"plugins/AnnounceZero/AnnounceZeroPlugin.py","lineNumber":104,"sourceCode":"\n        # Tracker can remove sites that we don't announce\n        if full_announce:\n            request[\"delete\"] = True\n\n        # Sent request to tracker\n        tracker_peer = connection_pool.get(tracker_address)  # Re-use tracker connection if possible\n        if not tracker_peer:\n            tracker_ip, tracker_port = tracker_address.rsplit(\":\", 1)\n            tracker_peer = Peer(str(tracker_ip), int(tracker_port), connection_server=self.site.connection_server)\n            tracker_peer.is_tracker_connection = True\n            connection_pool[tracker_address] = tracker_peer\n\n        res = tracker_peer.request(\"announce\", request)\n\n        if not res or \"peers\" not in res:\n            if full_announce:\n                time_full_announced[tracker_address] = 0\n            raise AnnounceError(\"Invalid response: %s\" % res)\n\n        # Add peers from response to site\n        site_index = 0\n        peers_added = 0\n        for site_res in res[\"peers\"]:\n            site = sites[site_index]\n            peers_added += processPeerRes(tracker_address, site, site_res)\n            site_index += 1\n\n        # Check if we need to sign prove the onion addresses\n        if \"onion_sign_this\" in res:\n            self.site.log.debug(\"Signing %s for %s to add %s onions\" % (res[\"onion_sign_this\"], tracker_address, len(sites)))\n            request[\"onion_signs\"] = {}\n            request[\"onion_sign_this\"] = res[\"onion_sign_this\"]\n            request[\"need_num\"] = 0\n            for site in sites:\n                onion = self.site.connection_server.tor_manager.getOnion(site.address)\n                publickey = self.site.connection_server.tor_manager.getPublickey(onion)","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/HelloZeroNet/ZeroNet/blob/454c0b2e7e000fda7000cba49027541fbf327b96/plugins/AnnounceZero/AnnounceZeroPlugin.py#L86-L122","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nif not res or \"peers\" not in res:\n    raise AnnounceError(\"Invalid response: %s\" % res)\n// after\nif not res or \"peers\" not in res:\n    self.site.log.warning(\"Zero tracker %s bad response: %s\" % (tracker_address, res))\n    return []","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    peers = announce_plugin.announceTrackerZero(tracker_address, file_info, *args)\nexcept AnnounceError as e:\n    log.warning(\"Zero tracker %s: %s\" % (tracker_address, e))\n    # next full announce cycle retries automatically","preventionTips":["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"],"tags":["network","zeronet","tracker","protocol","announce"],"backgroundTag":"invalid-tracker-response","analyzedSha":"454c0b2e7e000fda7000cba49027541fbf327b96","analyzedAt":"2026-09-02T19:46:57.278Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}