Safari extension "web_accessible_resources" resources are inaccessible.

In the manifest.json file I have set the following:

"web_accessible_resources": [
    "template.html"
]

Then used the following command to get the url

browser.runtime.getURL('template.html')

Which results in the following as expected:

safari-web-extension://40C1D308-F374-4C87-98C8-D9E9A4AD7945/template.html

However, when trying to fetch the file from within the script I get :

Failed to load resource: The requested URL was not found on this server.

And when pasting it as a url in safari I get :

Safari cannot open the page because the address is invalid.

The template.html file exists in the same folder as the manifest.json file. I've even tried placing it in a folder called html, then using the following with wildcard, and that doesn't work either.

"web_accessible_resources": [
    "html/*.html"
]

I am also facing the the issue related to rendering the html files from extension. Extension stops working(do nto receives any events anymore) after current active tab page URL is changed to point to one of the internal HTMl page.

I am also seeing this issue, I specifically cannot load script resource files bundled with my extension (used in script tags on the popup / options pages).

(Edit, this was an issue on my end due to the way a folder resource was linked & unrelated to the main question, I resolved by making sure the linked resource path matched the path in web_accessible_resources)

Safari extension "web_accessible_resources" resources are inaccessible.
 
 
Q