WebExtension does not start the content script

Hi all,

I have written a small web extension that should forward a button click of a self-written error page to my application.

To do this, I send the click information via window.postMessage() from the page script to the content script which then passes it to the background script via sendMessage().

My Extension works fine on a Firefox on PC where I can see the messages. But when I install it in my Android app (based on geckoview), the content_script does not start.

Originally, I started the HTML file from resource but acording to “https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns” a pattern “resource://path/” is invalid.

That’s why I added “file:///*” for content_script matches to the manifest and copied the HTML file to the local cache (and later to the download folder for testing) - but always the same: the content script does not start.

My manifest contains (amongst others) this:
“content_scripts”: [
“matches”: [“file:///*” , “<all_urls>”],
“js”: [“content.js”]
“permissions”: [

The content script starts with the borderfy example to see wether the context script is executed or not:
document.body.style.border = “5px solid red”;
console.info(“Content Script!”);

When I load a normal web page (e.g. https://mozilla.com), the script is started (I see the red boarders).

Does anyone have an idea why the script does not start on Android if I load a file:// ?
(the same file works on PC via file:///)

Thanks in advance