"Firefox can’t find the file at moz-extension://......" when running the built blank BEX, but not with quasar dev -m bex
See original GitHub issueThese are the commands I ran (I didn’t change the code in any way):
mkdir folder
cd folder
quasar create
quasar mode add bex
quasar build -m bex
cd ./dist/bex/UnPackaged && web-ext sign --api-key ... --api-secret ...
(I checked that I had the latest versions with npm outdated
) I then drag&dropped that signed xpi file (in the folder ./web-ext-artifacts/) into the latest Firefox ESR in Debian 10 stable (78.12.0esr) and installed the addon (with no other addons being installed/running in that Firefox profile). When I click onto the Quasar icon in the upper right of Firefox after it finished installing it shows this page:
File not found Firefox can’t find the file at moz-extension://extension-id/www/index.html.
instead of the proper (Vue/Quasar) page. This seems to be a critical bug.
Can somebody please at least confirm that this also occurs on their setup or add info with which versions these commands result in a bex running properly in Firefox?
I didn’t get an answer in the discussion and on Discord so far:
Discussed in https://github.com/quasarframework/quasar/discussions/10001
<div type='discussions-op-text'>Originally posted by mYnDstrEAm July 7, 2021 I installed the unsigned built addon in Firefox and I’m getting “Firefox can’t find the file at moz-extension://…” when clicking on the addon (the quasar icon in the upper right of the browser) to open the addon page. However, the page opens just fine with the temporary addon.
Seems like there’s a problem with some file-paths, mainly www/ ones (one can make it least show a blank page instead of an error page by changing the paths by removing the www/ which only work as is in dev mode).
Currently it at least does not find vendor.js and app.js as it looks for them in /js/ instead of /www/js. (In the console there is this message: Loading failed for the <script> with source “moz-extension://u-i-d/js/app.js”.)
Now I created a blank new BEX, it works with quasar dev -m bex
but dragging the built packaged Firefox .zip file into about:debugging and opening the addon page causes that same can’t find the file error (and unlike the upgraded version in additional I couldn’t install it because of it being corrupt so only loaded it as temporary addon).
With the project that I upgraded to Quasar 2 I get this can’t find the file error, with the blank new project with the below commands I get “The add-on downloaded from this site could not be installed because it appears to be corrupt”. I previously changed “xpinstall.signatures.required” to “false” in about:config to be able to install the unsigned addon (or does it need to be signed?). I did nothing but running these commands:
quasar create
npm i
quasar mode add bex
quasar dev -m bex
quasar build -m bex
Just like described here: https://quasar.dev/quasar-cli/developing-browser-extensions/build-commands (with the latest Quasar, the latest Node 12, latest npm and latest Firefox ESR 78.11 in Debian10). And it does not work in Firefox (due to problems with paths as far as I can tell).
What am I missing here? Any help is greatly appreciated (for example info whether the above works for you with the versions you’re using).
This may be a well-known problem or a very easy to solve, obvious fault.
I asked about this on Discord but didn’t receive any answer so far and it may also be useful to others – this is why I’m asking it here now.
I tried after signing the addon but it still displays File not found Firefox can’t find the file at moz-extension://extension-id/www/index.html.
even with the blank bex (I only ran those commands above). Any help?</div>
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Asked about it here. Would be nice if somebody could at least confirm this to also occur on their setup or report that building/running built BEX still does work on their system.
Fix will be available in q/app v3.1.7