So if you get a Firefox “InternalError” in browser-console when running your extension/contentscript on some sites, should you report a bug in bugzilla, or could it still be “your own” error?
It’s complicated code (and a complicated case). Won’t be easy to create a simplified test-case. Especially since it involves image-parsing (exif-data extraction) code I haven’t written myself, but inherited from an old extension which I forked my “xIFr” exif-reader extension from. And I’m not really expert on that subject.
I traced the error to a Int8Array. subarray() call throwing an
Error: Permission denied to access property “constructor”
accompanied by the error
Uncaught (in promise) InternalError: Promise rejection value is a non-unwrappable cross-compartment wrapper.
Any idea what that means?
Error only happens in MV3 version of my extension (not yet published on AMO, but in a secondary branch in my github repository) and seems to depend on
- Site visited
- Fetching image (to parse data from) from backgroundscript or fetching from frontend/contentscript
- The browser used
First of all, image is located at the same origin/domain as the page it is embedded in. For other cases I always use fetch from backendscript (well unless protocol is file:, data: or blob:). But fetching image (to parse) from frontend when image is located at same origin/domain as page, solved a problem on another site where it failed when fetching from background.
The parsing always happens in frontend and involves several parallel running scripts (if image is fetched from backgroundscript, imagedata is sent to contentscript for parsing).
For the site creating problems:
- It works in Chrome MV3 no matter if I am fetching from frontend/contentscript or from backendscript.
- It works in Firefox MV3 if I fetch from background, but fails when fetching from frontend/contentscript.
- It works in Firefox MV2 no matter if I am fetching from frontend/contentscript or from backendscript.
It doesn’t matter if I open image directly in the browser or open the page embedding the image.
It works on some sites, others it doesn’t [EDIT: removed claim it worked on most sites].
Does this ring a bell to anyone? Any ideas?
Yes, this is a though one. Curious to see if there will be any response to this at all…