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

Can not install extension to switch user agent #437

Closed
itsoulos opened this issue Jan 1, 2024 · 16 comments
Closed

Can not install extension to switch user agent #437

itsoulos opened this issue Jan 1, 2024 · 16 comments
Labels
bug Something isn't working could not reproduce This issue could not be reproduced

Comments

@itsoulos
Copy link

itsoulos commented Jan 1, 2024

Dear all,
I want to install a user agent switcher addon in pwa in order to make skype work in Asahi Linux but I have the following error
Screenshot_20240101_144758

@itsoulos itsoulos added the bug Something isn't working label Jan 1, 2024
@filips123
Copy link
Owner

It works fine for me on Windows and Ubuntu.

Please obtain the runtime logs using the instructions from here. You may also need to select "Multiprocess" at the top of the browser toolbox window.

Also, I have a few more questions:

  • When does the error appear? Immediately when you load the page, after clicking "Add to Firefox" or after confirming the installation in a popup?
  • Does this popup show?
    slika
  • Does it with other extensions?
  • Does it work in a new PWA profile?

@filips123 filips123 added question Further information is requested could not reproduce This issue could not be reproduced labels Jan 1, 2024
@itsoulos
Copy link
Author

itsoulos commented Jan 1, 2024

Thank you for your response,

  1. The problem appears when I try to load any plugin from the firefox running the web app
  2. the popup that you send me never appears
  3. I face the same problem with any other extension
  4. I will try to create a new profile later today and I will report any message from the log file

@filips123
Copy link
Owner

It's possible that something broke with the extension installation code. Another problem with the extension installation is #434, but I don't know if they are related, so I'll need logs for that.

@itsoulos
Copy link
Author

itsoulos commented Jan 1, 2024

here is the log file
console-export-2024-1-1_19-58-3.txt

@filips123
Copy link
Owner

This seems like a different issue than #434. It looks like the download failed for some reason. However, I still don't know why this happens...

Please also try to do this in a new PWA profile. If it works there, it's possible that some specific configuration broke the installation in the first profile. If the problem is also present in the new profile, it might be caused by some network issue.

@itsoulos
Copy link
Author

itsoulos commented Jan 1, 2024

No the problem remains.
I did not have any network problem there
The runtime firefox is installed in a separate directory

~/.local/share/firefoxpwa/runtime

is this a problem?

@filips123
Copy link
Owner

It is normal that the PWA runtime is separate from the default browser, and installed in ~/.local/share/firefoxpwa/runtime. However, maybe you have some firewall or some other configuration that blocks this runtime from downloading addons?

@itsoulos
Copy link
Author

itsoulos commented Jan 2, 2024

No, I have not any firewall.

@filips123
Copy link
Owner

You can also check what happened to the request to download the addon. In the Browser Toolbox (Ctrl+Alt+Shift+I), go to the "network" tab. Try to install the addon and check if any request for https://addons.mozilla.org/firefox/downloads/file/4098688/user_agent_string_switcher-0.5.0.xpi (or similar) appears and if it succeded. If it didn't, you can probably check the status code and the response to see if there are any useful details why it failed.

You can also copy the request as HAR and attach it. However, in this case, before uploading it, check it and clean any sensitive information such as cookies. You can also use Cloudflare's sanitizer to do this, although I'm not sure how reliable it is.

@itsoulos
Copy link
Author

itsoulos commented Jan 2, 2024

No. It appears to block the xpi for some reason.
In order to make it work I use firefox esr (115) in the runtime directory
Could be that the reason of the problem?

@filips123
Copy link
Owner

filips123 commented Jan 2, 2024

Well, I don't know.

If you download Firefox from Mozilla website and use it normally (without PWAs), does the addon installation work there?

@itsoulos
Copy link
Author

itsoulos commented Jan 2, 2024

Well, that is the main problem for me. The machine that I use is a m1 mac with Asahi Linux and I could not find any relevant tar.gz in the mozilla web site

@filips123
Copy link
Owner

So, the runtime that you use for PWAs is copied from the distro-provided Firefox, built for M1 ARM?

Then, one thing that you can try is to launch the runtime directly with something like:

~/.local/share/firefoxpwa/runtime/firefox --profile /tmp/some-empty-directory

And check if you can install addons. This should at least show if the problem is with some modifications that PWAsForFirefox is doing.

As a workaround, you can probably still install addons if you download the XPI file manually (maybe with curl) and then load the XPI directly into PWA runtime from about:addons.

@itsoulos
Copy link
Author

itsoulos commented Jan 2, 2024

None of these two options worked.
The problem with the corrupted file remains

@filips123
Copy link
Owner

This is really weird. Unfortunately, I don't know what causes this problem and how to solve it. Maybe it's a problem with Firefox version built for Asahi Linux. You should probably report it to the maintainers of Firefox package for Asahi or Mozilla.

@filips123 filips123 added help wanted Extra attention is needed and removed question Further information is requested help wanted Extra attention is needed labels Jan 2, 2024
@filips123
Copy link
Owner

Considering this was probably the problem with Firefox, I'll close this issue.

@filips123 filips123 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working could not reproduce This issue could not be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants