microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
8.41k stars 1.71k forks source link

[com.greengot] Can't open app due to TapAndPay API #2086

Open Cabanon opened 11 months ago

Cabanon commented 11 months ago

Affected app Name: Green-Got Package id: com.greengot

Describe the bug When opening the app, it freezes just after trying to connect with my account

To Reproduce

  1. Open the app
  2. Click on Connect
  3. Enter email
  4. Enter the code received by email

Expected behavior The app should open normally

System Android Version: 12 Custom ROM: /e/OS 1.16-s

microG microG Core version: 0.2.29.233013-2 (8c25b3f) microG Self-Check results: All ticked

Additional context When logging with ADB, I noticed 2 lines happening right when the application freezes:

11-10 11:22:11.259 D/GmsTapAndPay( 3539): onBind: Intent { act=com.google.android.gms.tapandpay.service.BIND pkg=com.google.android.gms }
11-10 11:54:37.304 D/GmsTapAndPay( 3539): bound by: GetServiceRequest{serviceId=TAP_AND_PAY, gmsVersion=12451000, packageName='com.greengot', extras=Bundle[{sdk_version=18.3.3}]}
11-10 11:54:37.308 W/GmsTapAndPay( 3539): Unknown method 74 in com.google.android.gms.tapandpay.internal.ITapAndPayService, skipping

Also I tried with an emulator with GAPPS installed and the ADB log indicates the following and the app launches correctly

11-10 11:45:14.400  1090  2448 W Pay     : Attempt to fetch active account from tapandpay failed. [CONTEXT service_id=198 ]
11-10 11:45:14.400  1090  2448 W Pay     : java.util.concurrent.ExecutionException: m.esw: 17: API: TapAndPay.TAP_AND_PAY_API is not available on this device. Connection failed with: erc{statusCode=SERVICE_INVALID, resolution=null, message=null}
11-10 11:45:14.400  1090  2448 W Pay     :  at m.wld.k(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):32)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.wld.j(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):39)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.jfl.a(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):31)
11-10 11:45:14.400  1090  2448 W Pay     :  at com.google.android.gms.pay.gcmtask.PayGcmTaskChimeraService.a(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):67)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.icg.call(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):32)
11-10 11:45:14.400  1090  2448 W Pay     :  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.fgr.c(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):50)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.fgr.run(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):76)
11-10 11:45:14.400  1090  2448 W Pay     :  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
11-10 11:45:14.400  1090  2448 W Pay     :  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
11-10 11:45:14.400  1090  2448 W Pay     :  at aizt.run(:com.google.android.gms@234414035@23.44.14 (150800-580326705):8)
11-10 11:45:14.400  1090  2448 W Pay     :  at java.lang.Thread.run(Thread.java:923)
11-10 11:45:14.400  1090  2448 W Pay     : Caused by: m.esw: 17: API: TapAndPay.TAP_AND_PAY_API is not available on this device. Connection failed with: erc{statusCode=SERVICE_INVALID, resolution=null, message=null}
11-10 11:45:14.400  1090  2448 W Pay     :  at m.eyx.a(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):15)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.etv.c(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):3)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.evg.t(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):48)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.evg.f(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):10)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.evg.j(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):233)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.evg.i(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):2)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.ezw.a(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):3)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.ezf.a(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):7)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.eyy.d(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):83)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.eyz.handleMessage(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):283)
11-10 11:45:14.400  1090  2448 W Pay     :  at android.os.Handler.dispatchMessage(Handler.java:106)
11-10 11:45:14.400  1090  2448 W Pay     :  at m.ibf.dispatchMessage(:com.google.android.gms.optional_pay@234414049@23.44.14 (100800-0):143)
11-10 11:45:14.400  1090  2448 W Pay     :  at android.os.Looper.loop(Looper.java:223)
11-10 11:45:14.400  1090  2448 W Pay     :  at android.os.HandlerThread.run(HandlerThread.java:67)

So it looks like the app works correctly even without Tap and Pay support, but doesn't work with microG for some reason

MagicRB commented 4 months ago

The reason for this is probably that the app checks for presence of Google services, if it doesn't see them it bails and takes a different code path. With microG present it takes the default path and rightfully assumes com.google.android.gms.tapandpay.internal.ITapAndPayService is available and functional (which it isn't) and so it crashes. Resolving this is related to #361 but may only require a partial bandaid depending on the details of that service.

Actually fixing this is way beyond my skill set though, sadly.

ale5000-git commented 4 months ago

The reason is probably because he/she is using a very older version of microG.

MagicRB commented 4 months ago

I'm hitting the exact same missing service in google wallet and revolut, just now and im one version behind.

ale5000-git commented 4 months ago

I don't remember exactly but I think it was a recent change so if you don't get the version v0.3.2 of both microG Services and microG Companion probably you won't see improvements.

Iey4iej3 commented 3 months ago

I don't remember exactly but I think it was a recent change so if you don't get the version v0.3.2 of both microG Services and microG Companion probably you won't see improvements.

I am not sure what improvement you suppose to have. I encountered the same error Unknown method 74 in com.google.android.gms.tapandpay.internal.ITapAndPayService, skipping under MicroG 0.3.2.240913 when I try to enable "Google Pay" in BoursoBank app.

ale5000-git commented 3 months ago

There is some minimal support in the code but I guess it isn't complete enough to make app works.

knocte commented 3 months ago

How can we help here?

ale5000-git commented 3 months ago

Mainly two possibilities:

knocte commented 3 months ago

I'm a coder, just check my github profile. I'm asking about technical specifics because I've never worked on this project.

ale5000-git commented 3 months ago

I don't know too much about this specific issue, I only looked at the commits and there was changes about this issue. I think it is @mar-v-in that know more about this.

ale5000-git commented 3 months ago

Usually to get more info about Google Play Services one need to:

Iey4iej3 commented 3 months ago

As far as I understand, right now, there are only dummies: https://github.com/microg/GmsCore/commit/91e830b102b8a46d296c9f338ab46cfc8522b95f

breversa commented 2 months ago

Green-Got is also mentioned here: https://github.com/microg/GmsCore/issues/2017