passbolt / mobile-passbolt-android

Android mobile app for Passbolt, the open source password manager for teams.
https://play.google.com/store/apps/details?id=com.passbolt.mobile.android&hl=en&gl=US
GNU Affero General Public License v3.0
41 stars 11 forks source link

Passbolt app 1.3 crashes on /e/ on scanning QR Code #1

Closed ldubost closed 1 year ago

ldubost commented 2 years ago

IMPORTANT: PLEASE READ

Only use github issues for bugs.

We will be more than happy to help you on the community forum for:

This is only a issue tracker for bugs related to the Passbolt Android Mobile App. For passbolt API, docker, command line interface, in short any other bugs please use the other relevant repositories.

If you are certain this is a new Android bug please use the following format:

ISSUE NAME

What you did

EXPLAIN WHAT YOU DID, PREFERABLY WITH CODE EXAMPLES, HERE.

  1. Manual install of apk from https://apkplz.net/app/com.passbolt.mobile.android
  2. Open passbolt app (app complains device maybe rooted -> which I believe is untrue)
  3. Click on "Connect to existing account"
  4. Click on "Scan QR Codes"
  5. Authorize screen shows up, click on one of the Allows (one time or when app in use)
  6. Passbolt crashes and disappears. No message about the crash

On retries if authorization already given it crashes on scan qr codes directly.

What happened

Passbolt crashed

What you expected to happen

Passbolt would not crash and camera shows up to scan QR Code

stripthis commented 2 years ago

helllo @ldubost,

Thanks for your report. We've not been testing the app on /e/, only stock android and lineageos. Can you give us the details of the crash report, maybe this is something that is applicable to others that we could fix?

It's also the first time we're hearing about this apkplz.net, is this a legit source of application on this system? We're considering publishing on F-Droid, would that be useful?

Concerning the rooted warning, we've not invested a lot of time to rule out false positive. It could for example also mean you have "rooted debugging" setting on, which we consider equivalent.

ldubost commented 2 years ago

Hi @stripthis,

Thanks for getting back.

I perfectly understand that given the newness of the app (which is a great progress btw - at XWiki passbolt is very important tool and having access to the passwords on mobile is very important), you can't test on all systems.

Is it an Android OS crash report that you need ? I saw a menu in Passbolt with logs but it seemed to be empty. I'm not super familiar with crash reports and if they contain the application crash information. I'd like to confirm this in order to avoid sending you useless data.

For apkplz.net, it's a good point. I asked /e/ to add your package (they have some mirroring of Google Play as far as I know) but it's not available yet. So I used this source for manual install as a workaround. It's clearly not legit in the sense that it's probably hard to control what's there. F-Droid is a very good idea IMHO and would be helpful for /e/ (though I'm new to /e/ so I could be wrong)

For the rooted warning I did check without the setting you mention (I had it initially). The warning is still there. It could be interesting to have a setting to ignore it as it could be annoying if you know what to do. I see why it could be a bad idea in most cases however as if your Phone gets rooted without your knowledge (if that's possible) it might be interesting to get a warning.

AnatomicJC commented 2 years ago

Hi @ldubost,

From Setting menu of our Android app, you can enable debug logs, which is disabled by default. Once enabled, reproduce your issue then send us the logs. You can share them by clicking on the share icon on the top right.

Best,

image

ldubost commented 2 years ago

Unfortunately the log has only 3 lines

Device: Fairphone FP4 Android 11 (30) Passbolt 1.3.0-4

nourcy commented 2 years ago

Hi @ldubost the issue here is that this is a custom ROM with no support for google services (https://en.wikipedia.org/wiki//e/_(operating_system)#Software). So we don't have logs because it is because of the ROM that is failing due to the lack of google services. But what we can do, if you are up to it, is to fetch more logs by building the app in debug mode and push the app to your device to get more information. You can follow the procedure to build the app: https://gitlab.com/passbolt/mobile/passbolt-android/-/blob/develop/README.md#L50 And also have a look to https://developer.android.com/studio/debug/am-logcat.html

Welcome to the dark side 😈

ldubost commented 2 years ago

I'm up to it. I thought about building it ! Thanks for the pointer. I'll see if I can try this this week-end. However the link you gave seems to be private.

You must mean the dark side of Passbolt, as I believe I know the dark side of Open Source: https://cryptpad.fr/ !

nourcy commented 2 years ago

Oops pardon..

How to build locally

With Android Studio (recommended)

  1. Launch Android Studio and open the cloned project
  2. Make sure that Android SDK with version 30 is installed to compile the project
  3. Wait until project configuration finishes (couple of minutes) and click Sync with Gradle files icon (top right toolbar - elephant with blue arrow)
  4. Open the Build Variants tab (bottom left vertical pane) and under the :app module select Active Build Variant as debug
  5. Prepare a device for launch - at minimum Android 10 (API 30) is required
    1. create and launch Android emulator or
    2. set up and launch on a real device
  6. Hit the Run arrow (green play icon in the top center)
ldubost commented 2 years ago

So, I don't know if this is good news or bad news, but the build version from Android Studio runs like a charm on the /e/ Fairphone. I was able to configure it using the QRCode.

I don't know if it would be because of changes in the source code or if it's heisenberg principle at work. I can try it again with an official build once the package is in the /e/ app store or in F-Droid.

I tried to run the "normal" version using "Run" in Android studio instead of "Debug", but it still seems to have the "debug" logo on it. However thinking about it it must be normal.

marcin-michalek-miquido commented 2 years ago

Hello, thank you for verifying that local build works fine. The code from master (13b62334) is exactly the one used to build the 1.3.0 version available on the Play Store. That creates one more possible cause - the packaging. For the Play Store we use the App Bundle format - we build the .aab file from which the Play Store generates multiple .apk which have smaller size (they contain only per-device content in regards of CPU architecture for native libraries (such as one used during QR scanning), image assets, etc). I see that apkplz.net have their own installer which should be able to assemble the full .apk from splits, but it's possible that something went wrong there. We have created a task for publishing to F-Droid and we will investigate it and complete in the next sprint (starting from 21/02). Once published we will notify you here. We will also verify the installation from F-Droid on our Lineage OS device.

P.S the debug logo is because of the debug build variant chosen (point 4 above) - the logo(icon) makes it easier to distinguish between installed variants - to not confuse it with production version if both are installed on the device.

githnu commented 2 years ago

I just downloaded Passbolt 1.9.0 from an older phone where it works to my new lineageos 18.1 phone. I am experiencing this bug immediately after clicking scan QR codes. The camera image flashes ever so briefly for one or so frames and then app crashes. It does not appear that there is any alternative installation method to get around this bug.

Note I also do not have google play services installed since I am trying to avoid using google accounts & services

You mentioned submitting to fdroid, yes please do! It gets very frustrating when software publishers will not publish their APKs for android forks.

marcin-michalek-miquido commented 2 years ago

hello @githnu, would it be possible for you to turn on the logs and check if there are crash details there?

  1. launch the app on the "Welcome" screen
  2. click the "?" icon in the top right corner
  3. toggle the "Enable debug logs" switch
  4. go to the scanning qr codes where the app crashes
  5. releaunch the app on the "Welcome" screen and go to the "?" icon again
  6. click "Access the logs"

I am not sure if for this particular crash there will be sth there, but if it is, the content would help us to diagnose the possible issue. It may be releated to installation as @ldubost had a simiallr issue and the app built by himself from Android Studio worked well. Right now I checked the app on LineageOS 18.1 on an old Samsung Galaxy S4 and the app works fine there (install from Android Studio) - I can also try instalilng the app the same way you did to see if I can reproduce ther issue, if you could share the details on how you did the installation.

githnu commented 2 years ago

Here's the debug log, apparently an object file is missing. BTW it shows the error twice and is not a copy mistake. I tried installing it different ways, but this copy was transferred from a working phone using sharik to install the APK. What way should I try to install it?

Device: OnePlus KB2003 Android 11 (30) Passbolt 1.9.0-11

02:51:11 Uncaught exception in thread: pool-3-thread-2 java.lang.UnsatisfiedLinkError: dlopen failed: library "libbarhopper_v3.so" not found at java.lang.Runtime.loadLibrary0(Runtime.java:1087) at java.lang.Runtime.loadLibrary0(Runtime.java:1008) at java.lang.System.loadLibrary(System.java:1664) at com.google.android.libraries.barhopper.BarhopperV3.(SourceFile:1) at com.google.mlkit.vision.barcode.bundled.internal.zza.zzc(SourceFile:1) at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzbk.zza(SourceFile:8) at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzb.onTransact(SourceFile:3) at android.os.Binder.transact(Binder.java:1043) at com.google.android.gms.internal.mlkit_vision_barcode.zza.zzc(SourceFile:2) at com.google.android.gms.internal.mlkit_vision_barcode.zzox.zze(SourceFile:2) at com.google.mlkit.vision.barcode.internal.zzl.zza(SourceFile:3) at com.google.mlkit.vision.barcode.internal.zzi.zzc(SourceFile:3) at com.google.mlkit.vision.barcode.internal.zzi.run(SourceFile:1) at com.google.mlkit.vision.common.internal.MobileVisionBase.zza(SourceFile:2) at com.google.mlkit.vision.common.internal.zzd.call(Unknown Source:4) at com.google.mlkit.common.sdkinternal.ModelResource.zza(SourceFile:8) at com.google.mlkit.common.sdkinternal.zzl.run(Unknown Source:10) at com.google.mlkit.common.sdkinternal.zzp.run(SourceFile:2) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze(SourceFile:4) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc(SourceFile:1) at com.google.mlkit.common.sdkinternal.zzi.run(Unknown Source:2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd(SourceFile:2) at com.google.mlkit.common.sdkinternal.zzj.run(Unknown Source:2) at java.lang.Thread.run(Thread.java:923)

java.lang.UnsatisfiedLinkError: dlopen failed: library "libbarhopper_v3.so" not found at java.lang.Runtime.loadLibrary0(Runtime.java:1087) at java.lang.Runtime.loadLibrary0(Runtime.java:1008) at java.lang.System.loadLibrary(System.java:1664) at com.google.android.libraries.barhopper.BarhopperV3.(SourceFile:1) at com.google.mlkit.vision.barcode.bundled.internal.zza.zzc(SourceFile:1) at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzbk.zza(SourceFile:8) at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzb.onTransact(SourceFile:3) at android.os.Binder.transact(Binder.java:1043) at com.google.android.gms.internal.mlkit_vision_barcode.zza.zzc(SourceFile:2) at com.google.android.gms.internal.mlkit_vision_barcode.zzox.zze(SourceFile:2) at com.google.mlkit.vision.barcode.internal.zzl.zza(SourceFile:3) at com.google.mlkit.vision.barcode.internal.zzi.zzc(SourceFile:3) at com.google.mlkit.vision.barcode.internal.zzi.run(SourceFile:1) at com.google.mlkit.vision.common.internal.MobileVisionBase.zza(SourceFile:2) at com.google.mlkit.vision.common.internal.zzd.call(Unknown Source:4) at com.google.mlkit.common.sdkinternal.ModelResource.zza(SourceFile:8) at com.google.mlkit.common.sdkinternal.zzl.run(Unknown Source:10) at com.google.mlkit.common.sdkinternal.zzp.run(SourceFile:2) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze(SourceFile:4) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc(SourceFile:1) at com.google.mlkit.common.sdkinternal.zzi.run(Unknown Source:2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd(SourceFile:2) at com.google.mlkit.common.sdkinternal.zzj.run(Unknown Source:2) at java.lang.Thread.run(Thread.java:923) 02:51:16 File logging tree planted

stripthis commented 2 years ago

Hello,

In order to install it I don't think this method will work. You can either rebuild the application yourself, or otherwise, you can try to use @AnatomicJC F-Droid repository: https://f-droid.open-web.fr/repo/ which contains passbolt build. We have in our roadmap to build a F-Droid repository but it is not a priority at the moment (as we have limited resource to have a dual release process).

Best regards,

githnu commented 2 years ago

I was not able to find any prebuilt APKs that work on a virgin lineageos install without google services. Maybe a future version might make the QR code optional?

Regarding alternatives not being a priority, I get it, the overwhelming majority of businesses and app developers also share that view and they don't understand/care why I use alternatives. I try to vote with my feet to support alternatives instead of the apple/google duopoly, but it's been so difficult. Not picking on you in particular, it's a battle with nearly every mobile app to provide any official support. I just feel defeated.

I do appreciate your responding and help though, thanks.

stripthis commented 2 years ago

@githnu I feel you, we also want to support people who are going to alternatives as it is in line with our value. We'll offer F-Droid support, most likely in 2023. Thank you for your patience.

AnatomicJC commented 1 year ago

@githnu if you are interested by installing apps from Google Play Store without any Google account, you can give a try to Aurora store, available on F-droid. Aurora acts as a proxy between you and the Play store. It can be an alternative. You can install from my f-droid repo previous versions from the passbolt apk but I guess you will have the same bug. Using latest version is highly recommended as it contains usually security fixes.

Best,

githnu commented 1 year ago

Good news: the Aurora store was able to install Passbolt 1.9.0-11 and the QR code reader works this time! BTW to anyone else encountering this: it was necessary for me to uninstall the previous APK of the exact same version number, otherwise the install "succeeds" without updating the actual files.

I remember google had broken the anonymous clients including aurora on 9 pie, so it's good to see that anonymous connections from aurora store are working now.

@AnatomicJC @stripthis, thank you both for the helpful suggestions.