I'm developing a Firefox add-on that should inject a content_script via the manifest on a certain website. When using manifest v2, everything works as expected. After switching to manifest v3 on Android however, the JavaScript file doesn't get injected.
On the desktop version of Firefox, manifest v3, the script only gets injected after the user clicks Permission needed to read and change data > Run for this visit only or clicks on Always Allow on .... The Android version however doesn't show such a dialog.
I've put a simple console.log and an alert command at the beginning of the content script to make sure it's not just the script encountering an error. I've used the Firefox debugging over USB to verify that the Add-on neither prints out the log message nor any other errors. I've tested on both the stable and nightly release. I'm using web-ext to test the add-on.
Here's a link to the specific commit after which the Add-on works again: annas-goodreads on GitHub. Besides version numbers nothing really changes. v2 just works, while v3 does not.
Interestingly, if I first install the add-on (on Android) with a v2 manifest and then with a v3 manifest, the add-on still works. If I remove the Add-on first and then install the v3 Add-on, it doesn't. I assume this is because Firefox remembers the permission to inject the script, which was granted automatically for v2 but isn't for v3.
I also can't find any documentation on changes to content scripts between v2 and v3.