FediAct icon indicating copy to clipboard operation
FediAct copied to clipboard

Orion Browser for iOS - Installation working but addon not running

Open rickdekker opened this issue 3 years ago • 11 comments

It is now possible to use Firefox extensions on iOS using Orion: https://apps.apple.com/gb/app/orion-browser-by-kagi/id1484498200

rickdekker avatar Dec 18 '22 23:12 rickdekker

Awesome, thank you for letting know! Added to the readme.

Lartsch avatar Dec 18 '22 23:12 Lartsch

@rickdekker did you actually get this to work? Via “Install from File” I get a no-op. Tried multiple versions of the zip file of the firefox extension.

ricklamers avatar Dec 19 '22 09:12 ricklamers

I was able to install by navigating to https://addons.mozilla.org/af/firefox/addon/fediact/ and clicking on “Download file”. That prompted install and seemed to work.

Not sure if the extension itself is working, after configuring an instance URL in the settings nothing seems to happen on follow actions on Mastodon profile pages of other instances.

ricklamers avatar Dec 19 '22 09:12 ricklamers

Doesn't seem to work for me either. I'm using Orion for Mac though. I tried basically everything: Chrome extension from store, Firefox extension from store, Firefox extension from GitHub Releases. The icon shows up and seems like everything's fine, but it's not working. Works really well in Firefox though.

stefandesu avatar Dec 19 '22 10:12 stefandesu

Okay, I will add to the readme that this is an untested solution / not guaranteed to work. I can't test / debug it myself, since I own no Apple devices. If anyone wants to make the effort to debug it, feel free and let me know if you need help.

Lartsch avatar Dec 19 '22 10:12 Lartsch

The first important information would be:

  • Does the popup open at all when the icon is clicked?
  • Are settings actually saved when submitting and re-opening the popup?
  • Are there any errors thrown by the background or content script?

Lartsch avatar Dec 19 '22 10:12 Lartsch

The popup works and it does save the information. I can't see any extension-related errors on the console. If I can find the time, I'll try to do more debugging on this!

It might not actually be an issue with the extension itself. It is known that some extensions just don't work yet with Orion and it is on them to fix it. I might open a thread on their feedback forum about it.

stefandesu avatar Dec 19 '22 10:12 stefandesu

I did a bit more debugging (although I have no experience with making browser extensions, so no idea what I'm doing) and summarized my findings in a post on the Orion feedback forums: https://orionfeedback.org/d/3946-extension-fediact-not-working

Seems to be two separate issues for the Firefox vs. Chrome extensions, and I'm hoping the people on the forums can provide help why it's not working.

stefandesu avatar Dec 19 '22 14:12 stefandesu

Thanks for your efforts, let's see where this goes. I already guessed it is about the chrome/browser namespaces (like you mentioned in the linked post for the Chrome error). But it makes me wonder how they support firefox and chrome addons if the namespace does not work. No idea what's with the Firefox error.

If you want exact code line information, you can clone the repo, edit the manifest.json to not use the minified files (e.g. background.min.js => background.js) and use the manual installation approach to test it.

Lartsch avatar Dec 19 '22 16:12 Lartsch

Okay, I tried to look into it a bit more, using the source and modifying files. Still no idea about that Firefox error. With the Chrome extension however, it seems like they don't support the chrome namespace in background service worker. During injection, those variables are available like you'd expect. I feel like they understood the issue (they already added the "Planned" tag to my thread) and will probably fix it at some point.

I guess it would be possible, in theory, to do everything during injection time, right? Or will there be issues with CORS when communicating with the home instance? Even if it was possible, it's probably not worth investing much time into it if the fix on their side is rather trivial.

stefandesu avatar Dec 19 '22 17:12 stefandesu

I guess it would be possible, in theory, to do everything during injection time, right?

No, sadly not. There are cases were the background script is absolute required, for example:

  • Grabbing the token, since requests made in the background script use existing cookies for domains (that's why FediAct needs nothing more than the home server domain)
  • Resolving toots by 302 redirects, since only requests in the background script can access the HTTP Location header

I also think we should let them do their work. If the code base supports Firefox & Chromium, I'm sure they can figure it out.

Lartsch avatar Dec 20 '22 11:12 Lartsch