3

Minimal reproduction: https://github.com/marcustyphoon/orion-ios-extension-test/tree/json-fetch

Fetching the result of runtime.getURL() allows web extensions' content scripts to access data files included in their package (if they're matched by the web_accessible_resources manifest key). This works just fine in desktop Orion, but while runtime.getURL() is supported on iOS Orion as documented, the fetch itself seems to fail with "TypeError: Load failed."

(This causes XKit Rewritten to not load on iOS Orion.)

Like desktop Orion does, iOS Orion should allow extensions to fetch web_accessible_resources in content scripts.

1.3.6 (2) (WebKit 8617.1.17.10.9)

17

    marcustyphoon changed the title to IOS: Extension cannot fetch "web accessible" resources .
      11 days later
      6 months later
      2 months later
      9 days later

      It's not a high priority for me to investigate this, but for the record, this doesn't seem to be fixed. The example extension results in SyntaxError: JSON Parse Error: Unexpected identifier "Export".

      • dino replied to this.

        marcustyphoon when we are trying with the lated Orion iOS release 1.3.10 we are getting expected result as in screenshots


        Can you please share a recorded video with latest Orion iOS release?

          Oops, I made a mistake in my initial reply; the error message mentioned is from another test with a javascript file. I can confirm your screenshots, however, actually utilizing the fetch result does not work. Calling result.text() on a JSON file results in an object, not text; calling result.text() on a javascript or text payload results in JSON parse errors. It sounds like the code implemented here is incorrectly calling JSON.parse on any import. Additionally, result.json() fails.

          I've updated the repro repository with examples that actually use and log the resulting data.

          13 days later
          No one is typing