bitwarden / mobile

Retired Bitwarden mobile app for iOS and Android (MAUI/Xamarin).
https://bitwarden.com
GNU General Public License v3.0
147 stars 23 forks source link

Android 12 Markup App crashing when Bitwarden is selected as auto-filling service #1688

Closed z0yXD9De1HGTx0RCvZ170HbWzl1OH1ePqK3e7Si closed 2 years ago

z0yXD9De1HGTx0RCvZ170HbWzl1OH1ePqK3e7Si commented 2 years ago

Steps To Reproduce

  1. Set system language to German
  2. Set Bitwarden as auto-filling service
  3. Make a screenshot
  4. Click on the edit icon
  5. Save the screenshot

Clicking the save button will crash the Markup App (System App). The screenshot will be lost after the crash, but there will be a corrupted file in the gallery.

Expected Result

Saving the screenshot without crashing the Markup App.

Actual Result

The Markup App (System App) crashes with an UnknownFormatConversionExcpection. This only happens when Bitwarden is selected as auto-filling service. I'm not sure if Bitwarden is causing this exception or if it's a bug within Android. But it's definitively somehow related. If other Apps are selected as auto-filling service the Markup App doesn't crash. A user on Reddit suggest the crash is only happening if the system language is German and Bitwarden is selected as auto-fill service. I did not validate if the system language is really involved.

If Bitwarden is not selected as auto-filling service Android Markup App is working just fine!

Screenshots or Videos

grafik grafik

grafik grafik

Additional Context

Here is another description of this problem from a Reddit user.

Bahiilein - 1 mo. ago

I` think I've found what causes the problem. It seems to be a combination of the German system language and giving an app full accessibility service for auto-filling (usually a password manager).

Either turning off the accessibility or switching system language to something different than German fixes the issue for me. So it sucks either way.

Android autofill framework doesn't break Markup but unfortunately not every app/service is compatible with it.

Operating System

Android

Operating System Version

12.0

Device

Pixel 6 Pro

Build Version

2.15.0 (4125)

Beta

bjnmZq48an1VsazlQj2KgKh5aI8TF5h8RaZ46ZA commented 2 years ago

Same here (inkluding Language, Device, Operating System Version)

Ysn4raFgYj4KDqNhXUtIDPH1WRiXlzWMeQr5hld commented 2 years ago

Works fine here, same Bitwarden version, Pixel 6, German, December patch. I remember this being an issue on Android 12 beta (on the Pixel 4a), but can't say I noticed on stable (which I setup fresh, not restoring system settings, only apps).

z0yXD9De1HGTx0RCvZ170HbWzl1OH1ePqK3e7Si commented 2 years ago

My device is a Pixel 6 Pro also with December patch. Maybe it's a specific problem with Pixel 6 Pro? Or maybe there is another factor involved.

ONDWZ7aJB3XTpeakNrg1VIxWTBfqcdDl5nXFm9w commented 2 years ago

Still an issue with the February patch for my Pixel 6 Pro set to german. Switching the system language to English doesn't fix the issue for me, but I didn't attempt a reboot afterwards.

z0yXD9De1HGTx0RCvZ170HbWzl1OH1ePqK3e7Si commented 2 years ago

Yes, same for me. Also I can reproduce this bug in Android Emulator with API level 31. So it seems it is related to Android 12 in general and not only Pixel 6 Pro.

fedemkr commented 2 years ago

Hi, thanks for the report. Could you tell me the emulator setup you used to reproduce the issue? I've attempted to reproduce it but on my tests on emulators is working just fine with Android 12, Autofill service set as Bitwarden, German language and the latest app version.

z0yXD9De1HGTx0RCvZ170HbWzl1OH1ePqK3e7Si commented 2 years ago

Hi @fedemkr,

thank you for your feedback. I tested a bit and I think I figured out, how to reliably reproduce this bug in the emulator. I would debug the issue my self. But I can't get Android debugging working on Windows 11 with Visual Studio 2022.

This is the setup of my emulator: 2022-02-17 13_51_29-bitwarden-mobile - Microsoft Visual Studio

  1. I opened a vault in Bitwarden. I'm not sure if this is crucial.

  2. You need to set the language to German.

  3. Set Bitwarden as auto-fill service. 2022-02-17 13_50_35-bitwarden-mobile - Microsoft Visual Studio

  4. Set Bitwarden as Accessibility (I think this is key to reproduce this bug in emulator) 2022-02-17 13_49_54-bitwarden-mobile - Microsoft Visual Studio

  5. Take a screenshot from the app switcher and click on the edit icon 2022-02-17 13_47_07-bitwarden-mobile - Microsoft Visual Studio

  6. Crop the screenshot 2022-02-17 13_47_47-bitwarden-mobile - Microsoft Visual Studio

  7. Click on annotate and draw something 2022-02-17 13_48_01-bitwarden-mobile - Microsoft Visual Studio

  8. Go back to crop. This is where the markup app will crash in the emulator. On the Pixel 6 Pro it will crash when you click on save. The dialog indicating that the app crashed will only show sometimes. 2022-02-17 13_35_26-bitwarden-mobile - Microsoft Visual Studio

2022-02-17 13_46_33-bitwarden-mobile - Microsoft Visual Studio

Sometimes you will find a defective file you can't open in the gallery, but not always

2022-02-17 14_16_13-bitwarden-mobile - Microsoft Visual Studio 2022-02-17 14_16_24-bitwarden-mobile - Microsoft Visual Studio

fedemkr commented 2 years ago

Hi @TheDuffman85 thank you so much for all the details!!! I'll try it as soon as I can and see what is happening 😄

z0yXD9De1HGTx0RCvZ170HbWzl1OH1ePqK3e7Si commented 2 years ago

Seems to be fixed with March update for Pixel 6 Pro. So it maybe was an Android 12 issue after all.