-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
WebClientClients or Indexer that are based on web servicesClients or Indexer that are based on web servicesbugSomething isn't workingSomething isn't working
Description
Tubifarry Version
v2.0.4.1-develop
Lidarr Version
v3.1.2.4914
Operating System
Docker
Bug Description
When attempting to add a new Lucida indexer in Lidarr, LucidaIndexer.Test() throws a NullReferenceException after FlareSolverr successfully solves the Cloudflare challenge. The indexer cannot be saved.
Steps to Reproduce
- Configure FlareSolverr notification in Lidarr (pointing to a working solver)
- Add a new Lucida indexer with
baseUrl: https://lucida.to - FlareSolverr solves the Cloudflare challenge successfully
- After retry with
cf_clearancecookie, the Lucida API returns service data LucidaIndexer.Test()crashes with NullReferenceException
Expected Behavior
adding indexer without issue
Trace Log Files
Stack Trace
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Tubifarry.Indexers.Lucida.LucidaIndexer.Test(List`1 failures)
Log Sequence
[Info] Protection challenge detected for lucida.to (attempt 1/3) - Status: Forbidden
[Info] Successfully solved challenge for lucida.to
[Info] Challenge solved, retrying with 1 cookies: [cf_clearance]
[Error] NullReferenceException in LucidaIndexer.Test()
Without FlareSolverr: all /api/countries?service=X return 403 → "No services available" (validation failure, no crash). The NullRef only occurs when the solver succeeds and actual service data is returned.
Root Cause Analysis
The .SelectMany().Any() LINQ chain in LucidaIndexer.Test() iterates services and their sub-collections (likely countries arrays). One service returns a null collection instead of an empty array, causing SelectMany to crash.
Suggested Fix
// Instead of:
services.SelectMany(s => s.Countries).Any(...)
// Use:
services.Where(s => s.Countries != null).SelectMany(s => s.Countries).Any(...)
// or
services.SelectMany(s => s.Countries ?? Enumerable.Empty<Country>()).Any(...)Log Checklist
- I have enabled Trace logging in Lidarr before reproducing the issue
Screenshots
Screenshots
Additional Context
Error in Lidarr UI
Validation failed:
-- BaseUrl: No services available from Lucida instance
Environment
- Lidarr: v3.1.2.4914 (nightly)
- Tubifarry: v2.0.4.1-develop
- FlareSolverr: simple-cloudflare-solver (port 8000)
- OS: Synology DSM 7 (Docker)
Notes
- The indexer was working earlier the same day (downloads at 06:19 UTC). The issue may be intermittent depending on the Lucida API response structure.
- A previously existing Lucida indexer was deleted and cannot be re-added.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
WebClientClients or Indexer that are based on web servicesClients or Indexer that are based on web servicesbugSomething isn't workingSomething isn't working