'Unable to create a RuntimeReferenceLibrary with AR Foundation in Unity

I'm trying to create a simple app for Android that recognizes images using AR Foundation in Unity. Using the normal ReferenceLibrary and filling it within the editor works perfectly without any issues. The reason I want to use the RuntimeLibrary is to be able to fill it up using an api.

I've tried everything on the documentation as shown here: https://docs.unity3d.com/Packages/[email protected]/manual/tracked-image-manager.html

I'm using AR Foundation 4.1.9 and Unity LTS 2021.
The problem is that when debugging (using LogCat or a serialized text field on the canvas) I do get a message saying the image is being added but when running the app it can't find it and instantiate a prefab on it.

Also have tried looking it up on the AR Foundation fora but no luck either.
Does anyone else have this issue or a solution for this strange behaviour?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source