kagisearch / browser_extensions

Official companion browser extensions for Kagi Search (Chrome, Firefox)
MIT License
79 stars 21 forks source link

[Request] Compatibility with Firefox for Android #3

Open tonogram opened 1 year ago

tonogram commented 1 year ago

It would be nice if the Kagi Search for Firefox extension was available to Firefox users on Android, if such a thing is possible. Currently you can manually add Kagi as a search engine (Settings > Search > Add search engine) but this relies on your session persisting, and does not work in private tabs (requiring you to log in again). Certainly not the worst thing in the world, but it would be nice to have.

The extension is now available on Firefox for Android, however the following features do not yet work:

vprelovac commented 1 year ago

Do you know what is currently preventing the extension from working on Android?

tonogram commented 1 year ago

I have no idea, I've never touched browser extension development and know next to nothing about how it actually works. For all I know, getting the Kagi extension to work on mobile could simply be impossible at this time, or it could be as simple as checking a "works on mobile" tick box on the Firefox extensions site. All I know for certain is that the install button is disabled on mobile.

ReimarPB commented 1 year ago

I tried running the current Firefox extension on Firefox for Android, and it runs but for some reason it's not able to capture the kagi_session cookie when opening the Kagi website, meaning it does not work in private windows. I tried debugging it but haven't been able to find out why.

Similarly, I was not able to get it to work in private mode when manually pasting the token in the addon either. I made sure the extension was enabled for private browsing and the same token worked on desktop, but it still did not work.

vprelovac commented 1 year ago

@BrunoBernardino Can you figure out what is needed for extension to work on FF Android

vprelovac commented 11 months ago

I'v enabled the flag for Android support in 0.3.2 release, not sure if that helps?

BrunoBernardino commented 11 months ago

I haven't investigated this yet, but we can certainly test once it's out!

BrunoBernardino commented 11 months ago

v0.3.3 still shows to me as incompatible with Firefox for Mobile.

vprelovac commented 11 months ago

v0.3.3 still shows to me as incompatible with Firefox for Mobile.

I did enable the checkbox so there must be something else Firefox for Android is looking for.

tonogram commented 11 months ago

Per addons.mozilla.org/.../firefox/... on my Android phone, I still cannot install the extension. It may be worth noting that there's a separate page for Android-compatible addons (addons.mozilla.org/.../android/...) in which Kagi does not appear in any search results.

I assume someone has gotten it working on their own Android device since this has been closed, but as far as I can tell it's still not available through traditional means.

BrunoBernardino commented 11 months ago

@tonogram indeed we closed this as we had done everything the Firefox for Android documentation told us, and it's possible to install it via a convoluted process of adding a custom collection in Beta/Nightly versions (there's no indication as to how to get into those pages, so I assume it's some manual verification process), but it doesn't quite work, as noted in https://kagifeedback.org/d/1768-summarizer-mobile-extension

It's something that's very hard to develop for and not really well documented, so I'll give it a shot again in a week or so, but if someone else has tips, we'd appreciate it.

tonogram commented 11 months ago

Thanks @BrunoBernardino and friends, I appreciate the work you're doing. Fingers crossed that something can be done.

BrunoBernardino commented 11 months ago

As per #26 the extension will look better once that's merged, but Firefox for Android still doesn't support anything we do, here, unfortunately. We'll have to take a look at this again in a couple of months, to see if anything changed.

vallode commented 10 months ago

I did not see this article mentioned here, so I thought it's worth linking: https://blog.mozilla.org/addons/2023/08/10/prepare-your-firefox-desktop-extension-for-the-upcoming-android-release/

It mentions an early September release (clearly missed now) but it also mentions that some changes might be required on the background scripts.

BrunoBernardino commented 10 months ago

Thanks @vallode ! That article is mentioned in the linked PR right above your comment. Unfortunately it's still not working with that.

brad-anderson commented 9 months ago

Firefox Nightly for Android seems to have cracked open the extensions. I added Kagi just fine.

The Kagi extensions doesn't seem to do anything currently, though. It doesn't recognize when you are signed in or affect available search providers but it's a start.

This indirectly made it much easier for me to use Kagi on mobile because now I can use the Cookie Auto Delete extension rather than only using Private Tabs to get my clean browsing fix (though I recently noticed the new advice for using the Session Link to get Kagi on private tabs which would have worked too).

runiq commented 8 months ago

FYI, Firefox 120 will be when the floodgates open and lots of addons from AMO will be available on Android as well. https://blog.mozilla.org/addons/2023/11/01/is-your-extension-ready-for-firefox-for-android/

BrunoBernardino commented 8 months ago

Thanks @runiq I've been paying attention but so far there's nothing we need to change, as far as we can tell.

UndarkAido commented 7 months ago

The extension's working! You just have to navigate the the extension page manually. It doesn't automatically add the search engine, though, so I still have favicon-less manually-added Kagi.

tonogram commented 7 months ago

I would also like to second that the extension Just Works™ on Firefox for Android. Closing the issue since it seems to be sorted now.

UndarkAido commented 7 months ago

The automatic search engine addition and universal summarizer shortcut don't work

BrunoBernardino commented 7 months ago

@tonogram can you please confirm that?

tonogram commented 7 months ago

I can corroborate that the Universal Summarizer does not work. The Summarize button seemingly does nothing.

automatic search engine addition

I assume this means adding Kagi to the list of available default search engines. I had already added Kagi manually but ostensibly the extension does not add the option itself.

Apologies for jumping the gun, I was only thinking about preserving the session and not about the other features. I'll update the original issue to accurately reflect the current problems.

meatyalien commented 7 months ago

@tonogram When you say "preserving the session," does that include private browsing mode?

The Kagi extension, other than the summarizer, has worked for me in normal browsing mode for months (via the addon collection install method), but it still isn't preserving the session in private browsing mode. As soon as I kill the app, or close all private windows and leave private browsing mode, my session is lost.

It used to preserve the session for me in private browsing mode, but hasn't worked since the release where the summarizer was added.

tonogram commented 7 months ago

@meatyalien Opening a new private session does work with Kagi, for me.

BrunoBernardino commented 7 months ago

@meatyalien can you please try, in the extension's permissions/settings, disabling the "Run in Private Windows" toggle, saving the token, then enabling it again?

meatyalien commented 7 months ago

@BrunoBernardino I can't believe it, that fixed it! I would have never even thought of that. I reinstalled the extension at least 5 times over the past few months, in an attempt to fix the problem, but I always toggled that on immediately after installing the extension. Thank you!

BrunoBernardino commented 7 months ago

Great! That solution should show up inline if your extension fails to save the session token manually since v0.4.3.

noodlejetski commented 6 months ago

it doesn't look like disabling the "allow in private mode" toggle, pasting and saving my generated token, and enabling the toggle again does the trick for me, I'm still asked to log in whenever I try searching in a private tab. using Firefox 121 on Android 13.

meatyalien commented 6 months ago

@noodlejetski Have you tried doing the process from a "clean slate." If not, try these steps:

  1. Uninstall the Kagi addon
  2. Logout of your Kagi browser session
  3. Close Firefox and clear the app's cache in Android
  4. Open Firefox and install the addon again (making sure not to check the "allow in private browsing" box)
  5. Login to Kagi
  6. Paste and save your new session token in the addon, kill Firefox once more, then open it and make sure the addon still recognizes your session and that search works in normal (non-private) browsing mode.
  7. Turn on "allow in private browsing" for the Kagi addon
noodlejetski commented 6 months ago

@meatyalien yes, I've done that and am still greeted with a login screen in private mode. not sure how I'm supposed to "make sure it works in normal browsing mode" in step 6 since I've already logged in step 5, and there's not much else the addon does.

meatyalien commented 6 months ago

@noodlejetski Sorry, I should have been more clear in step 6. I should have said to kill Firefox after saving your session token, then open it up again and verify the addon still recognizes your session and that you can search in normal browsing mode. I've since edited my comment to clarify that.

Another thing you could try is to install the nightly version of Firefox from the app store (Firefox Nightly), which is a little newer (version 123) than your version. I kind of doubt it will make a difference, but that's what I've been using and is the only version I've tried using the addon with, so it's worth a shot. If it still doesn't work, maybe one of the devs can chime in with other suggestions.

Just for reference, I'll post some of my device info below in case it can help the devs (or someone else) narrow down if there's some issue with certain devices (such as Android version, manufacturer OS variant/"flavor," or conflicting addons).

If you still can't get it working and want to post your device info, I can see if I can do some testing with a similar device/setup and try to replicate the issue. Since I'm not one of the developers of the addon, I can't guarantee that I'll be of much help, but I do have some programming experience and am willing to try my best to help if I can. I know how annoying this issue can be.


Device Info (Kagi Extension Working in Private Browsing)

andrewducker commented 3 months ago

I am confused. The Kagi Extension version you list there is 0.4.3, but the one at the addon page at https://addons.mozilla.org/en-US/firefox/addon/kagi-search-for-firefox/ is 0.3.8.

Where do I download 0.4.3 for Firefox Android?

BrunoBernardino commented 3 months ago

0.6.0 was the latest one available, but Mozilla removed it and reverted the page to 0.3.8 because they demand a privacy consent screen now (because the summarizer, when used, sends the current active tab's URL to Kagi). It's being fixed in #78 and once the legal piece of the full extension privacy policy is finished, should be live, but @vprelovac should know more.

andrewducker commented 3 months ago

I am delighted that Firefox take privacy seriously, and that you're getting it sorted!

BrunoBernardino commented 3 months ago

To be honest, the extension doesn't send anything the users don't authorize explicitly (the permissions the extension requests are already very specific, narrow, and require user opt-in), so it felt surprising and a bit targeted, but that's just my personal opinion.

pabpas commented 2 months ago

Is there any workaround for incognito mode until the extension comes back? Nvm it is explained in the docs: https://help.kagi.com/kagi/getting-started/setting-default.html#private_session

andrewducker commented 1 month ago

Hi, any update on when this will go live?