Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Firefox can’t find the file at moz-extension://......" when running the built blank BEX, but not with quasar dev -m bex #10190

Closed
mYnDstrEAm opened this issue Jul 25, 2021 Discussed in #10001 · 5 comments

Comments

@mYnDstrEAm
Copy link

mYnDstrEAm commented Jul 25, 2021

These 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 #10001

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?

@mYnDstrEAm mYnDstrEAm changed the title "Firefox can’t find the file at moz-extension://......" and when running the built blank BEX, but not with quasar dev -m bex "Firefox can’t find the file at moz-extension://......" when running the built blank BEX, but not with quasar dev -m bex Jul 31, 2021
@mYnDstrEAm
Copy link
Author

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.

@thomas66777
Copy link

I am also experiencing the same issue. It works if I use version:

    "quasar": "^2.0.0-beta.1",
    "@quasar/app": "^3.0.0-beta.1",

However this is not a great solution, it seems that the logic to build the extension directories and files changed since v2-beta. I hope someone at Quasar will be able to take a look. Thank you

@thomas66777
Copy link

I seems if I do the following it works:

  • manually unzip the file in dist/bex/Packaged/chrome
  • move index.html into the www folder
  • re-zip the directory

Then everything seems to work fine. I wonder if the fix is as simple as that.

@marcuspuchalla
Copy link

marcuspuchalla commented Oct 18, 2021

I can confirm that we have the same problem.

The solution works for us too. #10190 (comment)
If you use if (ctx.modeName === 'bex') { befre, this will also only be done when building the bex.

@rstoenescu
Copy link
Member

Fix will be available in q/app v3.1.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants