{"record":{"id":"b230c8c7208c1cd9","repo":"Sonarr/Sonarr","slug":"feed-contains-releases-with-same-guid-rejecting-m","errorCode":null,"errorMessage":"Feed contains releases with same guid, rejecting malformed rss feed.","messagePattern":"Feed contains releases with same guid, rejecting malformed rss feed\\.","errorType":"exception","errorClass":"UnsupportedFeedException","httpStatus":null,"severity":"error","filePath":"src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs","lineNumber":281,"sourceCode":"\n            _logger.Trace(\"TorrentInfo: \\n{0}\", torrentInfo.ToString(\"L\"));\n\n            if (releases.Any(r => r.Title.IsNullOrWhiteSpace()))\n            {\n                throw new UnsupportedFeedException(\"Feed contains releases without title.\");\n            }\n\n            if (releases.Any(r => !IsValidDownloadUrl(r.DownloadUrl)))\n            {\n                throw new UnsupportedFeedException(\"Failed to find a valid download url in the feed.\");\n            }\n\n            var total = releases.Where(v => v.Guid != null).Select(v => v.Guid).ToArray();\n            var distinct = total.Distinct().ToArray();\n\n            if (distinct.Length != total.Length)\n            {\n                throw new UnsupportedFeedException(\"Feed contains releases with same guid, rejecting malformed rss feed.\");\n            }\n        }\n\n        private void ValidateReleaseSize(TorrentInfo[] releases, TorrentRssIndexerSettings indexerSettings)\n        {\n            if (!indexerSettings.AllowZeroSize && releases.Any(r => r.Size == 0))\n            {\n                throw new UnsupportedFeedException(\"Feed doesn't contain the release content size.\");\n            }\n\n            if (releases.Any(r => r.Size != 0 && r.Size < ValidSizeThreshold))\n            {\n                throw new UnsupportedFeedException(\"Size of one more releases lower than {0}, feed must contain release content size.\", ValidSizeThreshold.SizeSuffix());\n            }\n        }\n\n        private static bool IsValidDownloadUrl(string url)\n        {","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/Sonarr/Sonarr/blob/da2284d7eaab22ed9b2ca698af690148d691e967/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs#L263-L299","documentation":"Thrown by ValidateReleases when release GUIDs contain duplicates. It collects all non-null Guid values, computes Distinct(), and rejects the feed if distinct.Length != total.Length. Duplicate GUIDs break dedup/history tracking and indicate a malformed or mis-paginated feed.","triggerScenarios":"Multiple <item> elements share the same <guid> (or permalink), or the parser falls back to a field that is identical across items (e.g. all empty then defaulted). Common when a feed repeats items across pages or uses the category as guid.","commonSituations":"Tracker serves duplicate items in one response (caching/pagination bug), guid is missing so the parser synthesizes the same placeholder, or the wrong field is mapped to Guid.","solutions":["Inspect <guid> values across items in the raw feed for duplicates.","If guids are legitimately missing, ensure the parser derives a stable unique guid (e.g. from enclosure url+length).","Report the duplicate-guid bug to the tracker operator.","Switch to an alternate feed URL that does not duplicate items."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var guids = releases.Where(r => r.Guid != null).Select(r => r.Guid).ToArray();\nif (guids.Distinct().Count() != guids.Length) {\n    _logger.Warn(\"Duplicate GUIDs detected; feed may be malformed or paginated wrongly\");\n}","typeGuard":"static bool GuidsAreUnique(IEnumerable<TorrentInfo> r) {\n    var g = r.Where(x => x.Guid != null).Select(x => x.Guid).ToArray();\n    return g.Distinct().Count() == g.Length;\n}","tryCatchPattern":"try { detector.ValidateReleases(releases, settings); }\ncatch (UnsupportedFeedException ex) when (ex.Message.Contains(\"same guid\")) {\n    // report the tracker is emitting duplicate GUIDs; do not enable this preset\n}","preventionTips":["Inspect raw <guid> values for duplicates before enabling a preset.","If guids are absent, synthesize a stable unique id (url+length hash).","Report duplicate-guid bugs to the tracker operator."],"tags":["torrent-rss","validation","guid","feed-detection","dedup"],"backgroundTag":null,"analyzedSha":"da2284d7eaab22ed9b2ca698af690148d691e967","analyzedAt":"2026-08-13T15:53:02.562Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}