oxen-io/session-android

[BUG] Session doesn't start without Google Play Services

Opened this issue · 13 comments

Code of conduct

Self-training on how to write a bug report

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I uninstalled com.google.android.gms with adb, and now whenever I open up Session, after authenticating with biometrics, the app automatically closes. Reinstalling com.google.android.gms makes the app work again, which confirms that the lack of com.google.android.gms is what is causing the issue.

Expected Behavior

Android phones without Google Play Services should be able to run Session. I understand that some people want to have fast notifications using Google's servers, but it is quite ridiculous that a privacy messenger would require Google Play Services to start at all, even if one chooses not to use fast notifications.

Steps To Reproduce

  1. Uninstall Google Play Services using adb (open up adb shell and run pm uninstall --user 0 com.google.android.gms; don't just disable it)
  2. Open Session
  3. App crashes

Android Version

13

Session Version

1.18.1

Anything else?

No response

Maybe disabling biometrics before removing google play services will fix the issue?. Is this behavior reproducible on the latest version of Session 1.18.1 If so it might be a good plan to update your report to include the latest version number

https://github.com/oxen-io/session-android/releases/tag/1.18.1

I can confirm that disabling biometrics before removing Google Play Services doesn't fix the issue. I just tried that on 1.18.1 and I have already updated the report to include the new version number.

Maybe disabling biometrics before removing google play services will fix the issue?. Is this behavior reproducible on the latest version of Session 1.18.1 If so it might be a good plan to update your report to include the latest version number

https://github.com/oxen-io/session-android/releases/tag/1.18.1

I can confirm that disabling biometrics before removing Google Play Services doesn't fix the issue. I just tried that on 1.18.1 and I have already updated the report to include the new version number.

I'm sorry, I deleted my above message 5 seconds after posting' when I noticed that the version number was indeed the latest. So I'm not sure why my message didn't disappear. Sorry for wasting your time

If an application is compiled to work with Google Play, it cannot work without it.

However, there is an FDroid version of the app, which should work either with or without google source.

Look on Fdroid. Fdroid is your friend..

How did you originally install the app? Did you install via Google play and then remove Google play services from phone, or did you install via APK/Fdroid/Other?

How did you originally install the app? Did you install via Google play and then remove Google play services from phone, or did you install via APK/Fdroid/Other?

I installed it from F-Droid. I don't think how I installed it matters, since reinstalling Google Play Services always makes the app work again (even if I disabled Play Services after reinstalling it). The point is, the app wouldn't work without com.google.android.gms installed.

Okay i see the issue, might take us a while to get around to fixing this, curious if this unofficial version of Session F-droid works without play services? https://f-droid.org/en/packages/network.loki.messenger.fdroid/

Okay i see the issue, might take us a while to get around to fixing this, curious if this unofficial version of Session F-droid works without play services? https://f-droid.org/en/packages/network.loki.messenger.fdroid/

The unofficial version does seem to work without play services, yea, though I would still like to see it fixed on the official one :P

Okay i see the issue, might take us a while to get around to fixing this, curious if this unofficial version of Session F-droid works without play services? https://f-droid.org/en/packages/network.loki.messenger.fdroid/

Hey, if you don't mind, could you update me with the progress on this? Thanks.

We haven't started working on this, probably won't be for a while until we get to this one

It seems awkward that it would crash.

Not sure if you're a dev, but there is another build variant website you could build that cuts out google cloud messaging but we haven't released that variant for some time. So if you check out the project you can build that. I'm not sure if there's other libs we're using that reference or require play services.

Or you can use my build

I'll try and see if it works for me, but please let me know if it works for you?

It seems awkward that it would crash.

Not sure if you're a dev, but there is another build variant website you could build that cuts out google cloud messaging but we haven't released that variant for some time. So if you check out the project you can build that. I'm not sure if there's other libs we're using that reference or require play services.

Or you can use my build

I'll try and see if it works for me, but please let me know if it works for you?

I'm not sure what you mean by the website build, but I can confirm that your build does work without Google Play Services.

Thanks so much, we have 3 build flavors, play, huawei and website, for play store, huwei store and our own website, but we're not actually building/publishing that flavor at the moment.

playImplementation ("com.google.firebase:firebase-messaging:18.0.0") {
        exclude group: 'com.google.firebase', module: 'firebase-core'
        exclude group: 'com.google.firebase', module: 'firebase-analytics'
        exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
    }

I have a PR to clean up that build a bit by removing the firebase notification options from the UI (which did nothing in that flavor anyway) and then we could publish that version to FDroid.