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

No secureboot.js in firefox. Installed via "Load temporary Addon" feature #11

Open
Abhinav1217 opened this issue Dec 24, 2022 · 6 comments

Comments

@Abhinav1217
Copy link

Abhinav1217 commented Dec 24, 2022

I cloned the repo, and made sure that submodule is fetched and updated.

Then as per the instructions on your readme, I went to about:debugging#/runtime/this-firefox and selected manifest.json file in Load temporary Add-On picker menu.

All I get is a white screen. Looking at network tab and comparing to my other laptop where older AMO version is still working, I think secureboot.js is not loading properly.

Am I missing some configuration step?

I tried asking on reddit but the support just downvoted my post and gave me a generic reply, even though I clearly mentioned that I am trying to install it via github not AMO.

@diegocr
Copy link
Contributor

diegocr commented Dec 24, 2022

@Abhinav1217 Sorry to hear about your bad Reddit experience.

Try opening the index.html file and replace src="/secureboot.js" by src="secureboot.js"

We do have a onBeforeRequest() handler that should take care of the redirection, but either that stopped working recently or perhaps you changed the version tag at the manifest file which is required for that to take action.

Also, if some resource files does fail to load you may need to open the web-console and enter localStorage.useBootStaticPath=1;location.reload()

(re-posted from meganz/webclient#97 (comment), we can leave the discussion here if you do still find problems)

@Abhinav1217
Copy link
Author

perhaps you changed the version tag at the manifest file which is required for that to take action.

Nop, Nothing changed by me, Just did a git clone, then ran git submodule update --remote --merge, opened the debugging section of firefox and selected manifest.js to load as addon.

Try opening the index.html file and replace src="/secureboot.js" by src="secureboot.js"

This moved something... Now I am getting an alertbox saying lang/en.json is missing. But atleast the secure.js is now loading.

Screenshot from 2022-12-25 13-28-02

Also, if some resource files does fail to load you may need to open the web-console and enter localStorage.useBootStaticPath=1;location.reload()

I tried this but couldn't get this to work. Here is a screencast of how I am doing it,

Screencast.from.2022-12-25.13-32-02.webm

@diegocr
Copy link
Contributor

diegocr commented Dec 26, 2022

path = path.replace('.json', '_prod.json');

The onBeforeRequest() handler should also take care of redirecting lang/en.json to lang/en_prod.json, you can rename it manually for the time being, i'll try to look into this soon.

@Abhinav1217
Copy link
Author

Yup It did the trick.

I duplicated the file cd ~/Projects/web-extension/webclient/lang then cp en_prod.json en.json and it worked.

I guess onBeforeRequest() is not working properly for firefox when installing from source.

Hope things things get resolved with AMO soon.
Thanks for all the help.

@Abhinav1217
Copy link
Author

Reopening as it would be better for you to decide if you want to close this now, or when issue with redirect handler is resolved for everyone.

@sundowndev
Copy link

sundowndev commented Feb 22, 2023

I had the exact same issue and I had to replace the path to secureboot.js in index.html

diff --git a/index.html b/index.html
index 4734c9580..1db46de60 100755
--- a/index.html
+++ b/index.html
@@ -11,7 +11,7 @@
 <meta name="apple-itunes-app" content="app-id=706857885"/>
 </head>
 <body id="bodyel" class="theme-light not-logged">
-<script type="text/javascript" src="/secureboot.js" charset="utf-8"></script>
+<script type="text/javascript" src="/webclient/secureboot.js" charset="utf-8"></script>

Then run git submodule update --remote --merge to update the webclient.

Then cp webclient/lang/en_prod.json webclient/lang/en.json.

Finally, reload the extension on Firefox.

So the issues here are:

  1. The root path of the extention should be / but it's actually /webclient (thus breaking the <script> tags)
  2. The webclient submodule is not up to date
  3. The lang/en.json to lang/en_prod.json redirection doesn't work

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

3 participants