this post was submitted on 30 Aug 2023
71 points (100.0% liked)

Firefox

17958 readers
629 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 4 years ago
MODERATORS
 

I've just switched from Brave to Firefox on Android and so far liking it. There's one issue though. I use Bitwarden for my credentials & SwiftKey as keyboard. When I go to a website that asks for credentials, the Bitwarden button shows up above my keyboard to unlock my vault, as expected. I click it, unlock with fingerprint, and select the credentials. So far it's as expected and the same as Brave. However, when I select a credential, it goes back to Firefox, but then refreshes the page; so the credentials are gone. Luckily the credentials then show up above my keyboard as I've unlocked the vault, but after some time of inactivity I have to unlock again and the problem reoccurs.

Any idea how to resolve this?

/edit: looks like a long outstanding bug in Firefox, see here https://bugzilla.mozilla.org/show_bug.cgi?id=1807364

top 17 comments
sorted by: hot top controversial new old
[–] [email protected] 25 points 1 year ago (2 children)

I have the same setup with Firefox and Bitwarden without issue. Do you happen to have Firefox setup for restricted battery usage? Android can be quite aggressive with that.

[–] [email protected] 16 points 1 year ago (1 children)

That, or a phone without much ram. I very often had similar issues on my previous phone when background apps instantly got killed due to memory constrains

[–] [email protected] 3 points 1 year ago

Got 6GB and never have issues with other apps. Brave and Chrome are fine.

[–] [email protected] 1 points 1 year ago (1 children)

Thanks, no haven't set up battery restrictions. Have disabled Miui default battery saver, set to no restrictions, still same issue. It happens only when I go to my vault.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Sounds to me it is MIUI that kills a lot of stuff for me all the time, I also don't know how to prevent it.

One way I do is start that other app first, than open needed tab in Firefox and do quick switch between apps. In that way FF is not reloading page, not Bitwarden but might be similar.

[–] [email protected] 2 points 1 year ago

It looks like a bug in Firefox, happens on many highend devices as well. https://bugzilla.mozilla.org/show_bug.cgi?id=1807364

[–] [email protected] 11 points 1 year ago (2 children)

Weird. I run the same setup as you (Firefox on Android with Bitwarden and SwiftKey) and I don't think I've ever experienced that. How much RAM does your device have? Do you have a lot of other apps running? It sounds like it is purging the page from memory when you're switching away.

[–] Nezuh 3 points 1 year ago (2 children)

I'm not OP but I have the same problem with a 4gb Ram S8 and Android 10 (custom rom, although the same thing was happening on stock).

I already checked all the battery saver settings and it's set to "Never suspend".

[–] [email protected] 2 points 1 year ago

I have a similar setup. The interesting thing is that never happens with Chrome.

[–] [email protected] 2 points 1 year ago

Interesting. I've got a Redmi Note 10 pro with 6Gb and zero issues with other apps. Also disabled Miui battery saver. Stock ROM, miui.

[–] [email protected] 1 points 1 year ago

Got 6Gb RAM so should be okay. Also disabled Miui battery saver, no difference. Brave and Chrome work fine.. Strange ay!?

[–] [email protected] 8 points 1 year ago (1 children)

Here is some explanation from firefox dev from two years ago https://www.reddit.com/r/firefox/comments/md63k4/comment/gs8mo2t/

The answer is complicated.

Mobile operating systems don't have swap space. When running multiple apps, a mobile OS needs to be more aggressive at freeing memory than desktop operating systems do. They do this by terminating background processes. The OS uses various heuristics to decide which process(es) to kill.

The problem that you're seeing is not intentional on our part; there isn't something in Firefox that says, "unload everything whenever I go into the background." Instead, it is caused by the content processes being terminated by Android itself.

We know that Chromium-based browsers seem to be working better in this regard. We do not yet have a clear picture about what specifically is causing our content process to be a frequent target.

We're in the process of collecting additional telemetry to help us diagnose this. I've also landed a patch that helps to clean up content process memory usage when Android tells us that it needs memory, in the hope that it will reduce the likelihood of a content process termination. We're also testing Nightly with multiple content processes enabled, which may help.

At any rate, I wouldn't call this problem an intentional design decision, nor would I call it solved. We're doing what we can to learn more about it and get it fixed at some point.

Sounds to me android is by design letting chrome based browsers and killing everything else.

[–] [email protected] 2 points 1 year ago

I find it got a bit better when I cleaned Firefox's user data and cache. I still get it occasionally, but it's a lot less frequent now.

YMMV of course depending on phone specs, but it worked for me on my mediocre hardware (Moto G Power).

[–] [email protected] 4 points 1 year ago (1 children)

I always use the Bitwarden auto-fill option in my notification shade. You can enable it in the Bitwarden app settings. You can also change how long it takes for the vault to re-lock itself.

[–] [email protected] 3 points 1 year ago

Yeah that works, the problem is when I go to my vault, which switches windows. I've extended the timeout so it happens much less. Thanks for the tip.

[–] [email protected] 2 points 1 year ago

you could try the Firefox extension version of bitwarden, but it might be annoying to set up. I'm not sure if they approved it in the extension store yet. if not you may have to switch to Firefox nightly or fennec fdroid and then create a custom extension collection. you can look up detailed guides on this.

[–] [email protected] 1 points 1 year ago

This is what the latest comment on the git issue says

Using Beta 114, I confirmed that setting dom.ipc.processPrelaunch.lowmem_mb to 0 MB fixes this issue which seems to happen when there's a memory pressure in the system. I can provide a profile with and without this preference if requested. I don't fully understand how this preference affects memory management when dom.ipc.processPrelaunch.enabled is false. Yet somehow it does.

Does this help at all?