marius-wieschollek / passwords-webextension

The official browser extension for the Passwords app for Nextcloud.
GNU General Public License v3.0
109 stars 34 forks source link

Extension not available on firefox for android v79 #97

Open rodrigoaguilera opened 4 years ago

rodrigoaguilera commented 4 years ago

Current Status When I visit https://addons.mozilla.org/en-US/firefox/addon/nextcloud-passwords/ With a newly installed firefox I get a message "Not available on Firefox for Android" and the button to add the extension is greyed out. I remeber using this extension in older versions of firefox for android but I don't have that device anymore.

Feature Description The extension can be installed

simonspa commented 4 years ago

As far as I understand the situation, this was a decision taken by Mozilla. They only activated nine "recommended" add-ons. To me, it is completely unclear how things will evolve from here, how these "recommended" add-ons are chosen (and will be chosen in the future) and what app developers can do to get their add-ons working again. For me, Mozilla broke the one-and-only Android browser supporting extensions.

Relevant information:

As users suggested there, the "old" Firefox (Fennec) is still available and supported (ESR) and can be installed from F-Droid.

marius-wieschollek commented 4 years ago

I have checked this on the current Firefox version. There is no way to run the extension. I can't even run it in debugging mode. Mozilla has blocked any non "recommended" extension from being executed. Mozilla seems to have a three year cycle where they kill their addon ecosystem, replace the old api with a new worse api and the promise that this will now be future proof.

I would recommend disabling the auto updates for Firefox or using Fennec from F-Droid.

marius-wieschollek commented 3 years ago

It is now possible to run development builds on Firefox for Android via adb again. I have used that option to test the addon there and fix the issues that i found. But right now some keys in the app manifest would cause the firefox android to fail while loading the extension, so only a specific build with a different manifest works.

Mozilla has also published a convoluted process of enabling addons from a custom collection in firefox nightly. But since this is not available for regular users and i would have to create a secondary listing for the android extension on AMO (which mozilla does not like), i don't think i will support this.

barcoboy commented 3 years ago

marius-wieschollek, is there any way we can get this working on Android? Both the Android apps by daper and joleaf are useless when E2E encryption is enabled, and they don't seem to be responding to requests to add this. The Firefox extension works great though on other platforms, so it would be great if I could get it working on my phone. I was excited when I saw the addon updated to version 2 on AMO, hoping I could finally use it in Android because there is no way to load the development .xpi version in Android like I was doing on other platforms. I installed Firefox Nighty on my phone, enabled development mode, and set up my custom collection. But trying to install the addon causes Firefox Nightly to get stuck at "Downloading and verifying add-on". If I kill Firefox Nightly and restart it, it says the add-on is installed, but it doesn't seem to do anything or let me go in to manage the extension. I really don't understand how or why Mozilla got rid of a perfectly working Android browser, and left us with a crippled piece of junk that you can't do anything with.

simonspa commented 3 years ago

Hi @barcoboy

I don't think there will be a way to use this in the foreseeable future on Android due to the way Mozilla has decided to handle extensions.

The android apps (just as this web app) are developed by great people in their spare time, so I think you are a little harsh claiming "they don't seem to be responding". In addition, especially joleaf is very actively developing his app and normally answers quite quickly to new feature suggestions. I'm not sure how you tried to reach out to him, but I don't see any E2E related feature request open in his app repository. Maybe head over there and add one: https://gitlab.com/joleaf/nc-passwords-app/-/issues (again, keeping in mind that these people do you a tremendous favor in spending their free time to provide you with great apps...)

Cheers

barcoboy commented 3 years ago

My apologies for sounding harsh. It's just so frustrating to be so close to getting something that works and every way I try something blocks the way. Should be directing my frustration at Mozilla, not anyone else.

I just tried to go down the Chrome route, but again can't get it to work. Got as far as installing Kiwi for Android, enabling development mode for Chrome extensions, installing the Nextcloud Passwords extension, and registering my phone via Passlink successfully. But now, when I try to use it the extension, it won't let me login using my master password. :-(

marius-wieschollek commented 3 years ago

As i said before, the current AMO version of the extension is not compatible with Firefox for Android. I have done some tests to see if AMO can host two different variants (Desktop and Android) of the same extension in the same extension listing, but it did not work. With mozillas deployment tool, the extension is always submitted as suitable for Desktop and Android. Uploading it manually disables the other version and the extension will be on AMO as "Android only". When i have some time i will ask them if they have any recommendation how to handle this case.

For right now, the extension only works on Android if you build it your self for the fenix platform (npm install && npm run build:fenix). But this way, there is no persistent installation possible. So we're stuck here until Firefox Android is fixed or i find a way to host the extension on AMO.

barcoboy commented 3 years ago

Well I got a bit further with Kiwi. After finding another thread somewhere about enabling #enable-webassembly-streaming in kiwi://flags, I was able to login using my master password. But now, I don't see any of my stored passwords.

marius-wieschollek commented 3 years ago

Is there anything in the debug log in the options related to this?

barcoboy commented 3 years ago

When I connect and hit the refresh icon, I see this in the debug log:

{"details":{"data":{"message":"Could not establish connection. Receiving end does not exist."},"stack":"Error\n    at Object._getDetailsFromObject (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:1:6332)\n    at Object._addError (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:1:5691)\n    at Object.logError (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:1:5526)\n    at Object._sendMessage (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:1:11478)","time":1610805766225},"error":{"message":"Could not establish connection. Receiving end does not exist."}}

Also I am seeing multiple messages similar to this one:

{"details":{"data":{"_response":{},"_status":412},"message":"HTTP 412 - Precondition failed","stack":"HttpError: HTTP 412 - Precondition failed\n    at Vt.getClass (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:123920)\n    at Lt.getClass (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:162701)\n    at et._getHttpError (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:139116)\n    at et._processJsonResponse (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:138489)\n    at et.send (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:137407)","time":1610805802952},"error":{"name":"HttpError","stack":"HttpError: HTTP 412 - Precondition failed\n    at Vt.getClass (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:123920)\n    at Lt.getClass (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:162701)\n    at et._getHttpError (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:139116)\n    at et._processJsonResponse (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:138489)\n    at et.send (chrome-extension://mhajlicjhgoofheldnmollgbgjheenbi/js/background.js:22:137407)","string":"HttpError: HTTP 412 - Precondition failed","message":"HTTP 412 - Precondition failed","_response":{},"_status":412}}

marius-wieschollek commented 3 years ago

I think that is #133

barcoboy commented 3 years ago

Yes, it does appear to be. I can confirm that the same thing happens to me on Firefox and Chrome on a Mac.

Possibly related to the same problem, I discovered that I am unable to save any new passwords to my server. After clicking on the "a new password was detected" Firefox notification, I can go in and see the new password that was collected, but when I click the "Save" icon, Firefox pops up the notification again, and the password is not saved. Same thing happens in Chrome as well. I do see the following in my Apache logs, so I know the plugin is trying to do the save:

16/Jan/2021:15:25:15 -0500] "POST /index.php/apps/passwords/api/1.0/password/create HTTP/1.1" 412 74

barcoboy commented 3 years ago

Thank you @marius-wieschollek, I see that #133 is closed, and this fixed all of my Firefox issues.

Just wondering if the Chrome extension was also updated? I see version 2.0.2 is still the latest one installed on the Chrome Web Store.

marius-wieschollek commented 3 years ago

The chrome web store has a review process that can take some days.

barcoboy commented 3 years ago

That's what I wondered... thanks for the info.

barcoboy commented 3 years ago

So after version 2.0.4 finally appeared on the Chrome Web Store, I've had a bit of time to play with things, and have good news and bad news.

The bad news is that things still don't work in Kiwi. I am able to login to Passwords with my master password, but no passwords are retrieved from the server. Clicking reload and after the icons spins for a bit, there is no change. Trying to generate a new password results in the 412 Precondition failed messages.

The good news is that I found another Chromium based browser on Android called "Yandex Browser", and the Chrome plugin works perfectly with it! So there is now a working Android E2E encryption solution until Firefox gets their you-know-what together and allows plugins to be loaded again. (Nightly Firefox still does not work unfortunately, still locking up when trying to install it.)

I would like to see Kiwi working as I prefer this browser to Yandex, but I'm guessing there is an incompatibility in Kiwi that is preventing it from working there. You already have to enable the #enable-webassembly-streaming flag in order to be able to login with a master password, so maybe there is another flag that has to be changed to get it to fully work. I tried enabling all of the other webassembly flags, but no luck.

At least though there is something that works on Android now, and Yandex doesn't need any special configuring, just the plugin to be installed and configured as normal.

stephanlachnit commented 2 years ago

I'm not able to configure the extension on Firefox Mobile Nightly (102.0a1). I am able to install it, however I'm not able to open the settings at all (most of the time it is not shown in FF, and when I am able to click on settings I get an empty page). Using PassLink doesn't work either.

I think the problem is probably the UI since it works via a pop up. Maybe a settings page like e.g. uBlock Origin has can help?

synthead commented 1 year ago

Any chance we could prioritize this issue? It has been open for a while and it would be great to have this working in Firefox for Android!

marius-wieschollek commented 1 year ago

AFAIK, Mozilla's policy regarding extensions on Firefox for Android has not yet changed. I don't really see a reason to prioritize this since the complicated installation procedure means that not many users will use it and additionally i will have to remove/rewrite some functionality in order to make this extension work on Firefox for Android and the normal Firefox.

synthead commented 1 year ago

What functionality would have to be rewritten? I might be interested in implementing this at some point :slightly_smiling_face:

synthead commented 1 year ago

Hey this is interesting: https://blog.mozilla.org/addons/2023/08/10/prepare-your-firefox-desktop-extension-for-the-upcoming-android-release/