bug: idPrefixes is set to an empty array when undefined or null during installation causing resources to not be requested
Stremio Platform
Android Mobile Beta
Describe the bug
If idPrefixes is left undefined (or even if manually set to null) in the individual resource objects ({ name, types, idPrefixes? }), when the addon is installed through the android beta, the idPrefixes values are replaced with [] during the install.
This causes the addon to not be requested for streams on any platform.
To my understanding, according to the stremio addon docs, idPrefixes is optional and this should not be happening.
To Reproduce
To reproduce the bug:
edit: the manifest will no longer reproduce the same issue due to updates, but I have provided the manifest in the screenshots section.
- Install this addon:
stremio://aiostreams.viren070.me/stremio/80060214-34a1-4bc6-943a-f20390c3a2ff/eyJpdiI6ImxEcDNJY3FvdEpBa0lrTkU1bjQ2M2c9PSIsImVuY3J5cHRlZCI6InNlMTNTRmJQV085M1hGcXRJa1J0R2VBN1Vvd1hLYVlEK1RldlZ6WHJXOGM9IiwidHlwZSI6ImFpb0VuY3J5cHQifQ/manifest.jsonvia the android beta - Open a title
- See a 'no streams found' message on android and a
No addons were requested for streams!message on stremio web
To see the expected behaviour
- Install
https:///aiostreams.viren070.me/stremio/80060214-34a1-4bc6-943a-f20390c3a2ff/eyJpdiI6ImxEcDNJY3FvdEpBa0lrTkU1bjQ2M2c9PSIsImVuY3J5cHRlZCI6InNlMTNTRmJQV085M1hGcXRJa1J0R2VBN1Vvd1hLYVlEK1RldlZ6WHJXOGM9IiwidHlwZSI6ImFpb0VuY3J5cHQifQ/manifest.jsonvia Stremio Web - Open a title
- Observe streams being loaded on both the android beta and stremio web
Expected behavior
The expected behaviour for the android beta is to install correctly and provide streams. This can be observed by installing the addon through stremio web - everything works as expected this way.
By using the Stremio API's addonCollectionGet endpoint, I was able to see the difference in the way the android beta and Stremio Web installed the addon, see the screenshot attached below.
On the left is when installed through Stremio Web, on the right is through the android beta . The addon installed via Stremio Web shows streams on the android beta as expected, and the addon installed via the android beta shows no streams on either the android beta or on stremio web.
Screenshots
The manifest at the time of writing, in case it changes due to updates:
{
"name": "AIOStreams",
"id": "aiostreams.viren070.com.80060214-34a",
"version": "2.0.1",
"description": "AIOStreams consolidates multiple Stremio addons and debrid services into a single, easily configurable addon. It allows highly customisable filtering, sorting, and formatting of results and supports proxying all your streams through MediaFlow Proxy or StremThru for improved compatibility and IP restriction bypassing.",
"catalogs": [],
"resources": [
{
"name": "stream",
"types": [
"movie",
"series",
"anime"
],
"idPrefixes": null // the same issue occurs when not present in the manifest too
}
],
"types": [
"movie",
"series",
"anime"
],
"background": "https://raw.githubusercontent.com/Viren070/AIOStreams/refs/heads/main/packages/frontend/public/assets/background.png",
"logo": "https://raw.githubusercontent.com/Viren070/AIOStreams/refs/heads/main/packages/frontend/public/assets/logo.png",
"behaviorHints": {
"configurable": true,
"configurationRequired": false
},
"addonCatalogs": []
}
Desktop (if applicable)
No response
Smartphone (if applicable)
Device: any android phone/tablet on the beta Version: 2.0.0-rc.10
TV (if applicable)
No response
Logs
Notes
No response
if you don't need to use idPrefixes, remove it from the manifest, don't set it as nullish otherwise it will be interpreted as an array
It was initially not present in my manifest. But i encountered this issue and noticed it was being replaced with an empty array during installation on the android beta only.
I set it to null in an attempt to manually fix it.
i'm tempted to change idPrefixes to required tbh, an addon should always set the IDs it handles, there have been various issues in the past with addons that try to respond to all possible IDs
That would be fine with me. The only reason I had to try and leave it empty was when someone tried wrapping an addon that didn't specify an idPrefixes together with an addon that did specify idPrefixes. Meaning AIOStreams then also had to leave idPrefixes undefined or Stremio wouldn't send a request to AIOStreams for the addon that didn't specify idPrefixes
Is this something that is planned to be fixed or is idPrefixes going to become required?
@Viren070 hi, sorry for the wait, the issue is that this is a low priority task (so there is no possibility of giving an ETA) and in order to make idPrefixes required we would need to research the impact it will have on the current community addons
No problem, that is understandable.