Skip to content

prevent crashes from some addons - #197

Merged
ProdigyV21 merged 1 commit into
ProdigyV21:mainfrom
silentbil:addons_crashes
May 16, 2026
Merged

prevent crashes from some addons#197
ProdigyV21 merged 1 commit into
ProdigyV21:mainfrom
silentbil:addons_crashes

Conversation

@silentbil

Copy link
Copy Markdown
Collaborator

when a Stremio addon is installed, its manifest is fetched from the network, converted to AddonManifest (which contains a list of AddonResource objects), and persisted to disk. When the app restarts and loads those
saved addons, Gson deserializes the stored JSON back into AddonResource objects — and if the original manifest had no types field (some addons omit it), Gson sets types to null despite the Kotlin type saying List.

So it crashes specifically when:

  1. The user has at least one installed addon whose manifest has a missing/null types field
  2. They navigate to a movie or episode and the app calls getStreamAddons() to figure out which addons support that content type
  3. supportsResourceType(resource.types, ...) is called with that null list → NPE

An addon with a fully valid manifest (always includes "types": [...]) would never trigger it. It only hits users who installed certain addons that return incomplete manifests.

@ProdigyV21
ProdigyV21 merged commit 1fcaec8 into ProdigyV21:main May 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants