Page MenuHomePhabricator

Username shown as a temporary account after copying Wikipedia Beta app from Android phone to another
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
Samoasambia
May 13 2025, 10:30 AM
Referenced Files
F59933084: image.png
May 13 2025, 10:30 AM
F59933076: image.png
May 13 2025, 10:30 AM
F59932998: image.png
May 13 2025, 10:30 AM
F59932993: image.png
May 13 2025, 10:30 AM
F59932980: image.png
May 13 2025, 10:30 AM

Description

Recently I got a new Android phone and I copied my apps including Wikipedia Beta from my old Android phone into the new one using the transfer service on the OS. When I opened the Wikipedia Beta app on the new phone it says I'm using a temporary account named "Samosambia" which obviously isn't correct. I was logged in with my username on the old phone and somehow copying the app made the app display it as a temporary account.

The app let me edit and the edit was saved with my username. Interestingly the editor warned me about using a temporary account despite Finnish Wikipedia not having temporary accounts yet.

The main menu showing the temporary account symbol with my username:

image.png (2×1 px, 1 MB)

Log in screen saying I'm using a temporary account named "Samoasambia":

image.png (2×1 px, 156 KB)

Temporary account "exit session" button and days until expiry (zero) in the settings:

image.png (2×1 px, 178 KB)

Temporary account warning when opening the editor:

image.png (2×1 px, 181 KB)

Temporary account warning when saving an edit:

image.png (2×1 px, 163 KB)

Environments observed

App version: 2.7-50530-beta-2025-05-02
Android OS versions: Android 15
Device model: HMD Skyline
Device language: Finnish

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Thanks! An interesting catch--
When you log into the app, your credentials are stored in Android's secure AccountManager, which is technically separate from the app and its associated data. So, when you copy the app from one device to another, the corresponding AccountManager credentials are not necessarily copied (this seems to behave differently under different Android versions, and perhaps for different manufacturers, etc).
The problem is that the app saves cookies (which are copied along with the rest of its data), which leads to an inconsistent state: If the app has valid session cookies, but doesn't have an account in the AccountManager, it assumes that it's using a temporary account.

We can fix this relatively easily by adjusting the logic of detecting a temporary account more explicitly.
The effect will be that you'll need to re-login on your new device after copying the app.

ABorbaWMF subscribed.

@Samoasambia - We think we have this one fixed, but none of us has the exact setup you used to reproduce this bug. We are moving forward now, and the fix should be included in the next release to the App Store. If possible, could you check if this issue persists once you have the new build? I can also post a link here if you'd prefer not to wait for the store. Thanks!

https://releases.wikimedia.org/mobile/android/wikipedia/stable/wikipedia-2.7.50534-r-2025-06-12.apk

@Samoasambia - We think we have this one fixed, but none of us has the exact setup you used to reproduce this bug. We are moving forward now, and the fix should be included in the next release to the App Store. If possible, could you check if this issue persists once you have the new build? I can also post a link here if you'd prefer not to wait for the store. Thanks!

https://releases.wikimedia.org/mobile/android/wikipedia/stable/wikipedia-2.7.50534-r-2025-06-12.apk

I tested it by downloading the new release, logging in with my account, deleting the account in the device settings and opening the app again. The app had logged me out as expected and didn't show me using a temporary account so I think the bug is now resolved. Thanks a lot!