Wordpress-android: SecurityException: Not allowed to bind to service Intent { act=com.google.android.finsky.BIND_GET_INSTALL_REFERRER_S...

Created on 26 Sep 2019  路  19Comments  路  Source: wordpress-mobile/WordPress-Android

Sentry Issue: WORDPRESS-ANDROID-1V

SecurityException: Not allowed to bind to service Intent { act=com.google.android.finsky.BIND_GET_INSTALL_REFERRER_SERVICE cmp=com.android.vending/com.google.android.finsky.externalreferrer.GetInstallReferrerService }
    at org.wordpress.android.util.analytics.service.InstallationReferrerServiceLogic.performTask(InstallationReferrerServiceLogic.java:124)
    at org.wordpress.android.util.analytics.service.InstallationReferrerService.onStartCommand(InstallationReferrerService.java:48)
...
(10 additional frame(s) were not displayed)

Not allowed to bind to service Intent { act=com.google.android.finsky.BIND_GET_INSTALL_REFERRER_SERVICE cmp=com.android.vending/com.google.android.finsky.externalreferrer.GetInstallReferrerService }

Low priority, since it's not a crash and it doesn't affect our users - only our statistics.

General [Pri] Low [Type] Bug

Most helpful comment

Hi everyone! @malinajirka and I just investigated this issue and in our investigation, it seems this is an issue of the Google client library that's handling referrals. There are several others who are experiencing the same issue in their codebase so we have verification that this is an external issue. https://issuetracker.google.com/issues/70193614

We are already catching the SecurityException as described here https://github.com/wordpress-mobile/WordPress-Android/issues/10532#issuecomment-535638310 as it extends RuntimeException so this isn't actually causing any crashes for our users, so we think it's best for us to revisit this in three months to see if Google has released a fix.

That said, I notice that in the code snippet you're catching the more general RuntimeException instead of just the SecurityException. Is that on purpose? I mean, any particular reason for the catch to be that broad
?

Good point. I wondered this as well. Something that could be looked into.

So yes, we think this is a low priority issue for now. In Sentry it only affects about 40 - 50 users per day and there are 7000 events being sent to Tracks so we should be good.

All 19 comments

90-day impact: ~57 per day
Users affected in the last 90 days: 363
Limited to: Android 7.1.1 and below, ~WPAndroid 12.9 and below~
https://sentry.io/share/issue/c3c94fd6828449048717840e46df80f8/

We should check to see if this was fixed in WPAndroid v13.0.

The number of crashes have reduced since 12.9 but it's still happening up to 13.2. If you check the events here filtered for 13.0 and up https://sentry.io/organizations/a8c/issues/1016113576/events/?project=1438088&query=version%3A13%2A you'll see those events. It's a smaller amount but I don't think we've fixed this yet and should keep it on the radar

90-day impact: ~61 per day
Users affected in the last 90 days: 382
Limited to: Android 7.1.1 and below
https://sentry.io/share/issue/c3c94fd6828449048717840e46df80f8/

Sorry for the delayed response @JavonDavis !

@hypest I'm thinking we can just catch the SecurityException here as well... WDYT?

I think that would work, but I'm not sure if that'd be compatible with the rest of the logic of the feature. To make sure, I'd refer to @mzorz and @theck13 that implemented the feature.

That said, I notice that in the code snippet you're catching the more general RuntimeException instead of just the SecurityException. Is that on purpose? I mean, any particular reason for the catch to be that broad?

I'm not sure at this point, what the next step would be. Here's what we analyzed and did before, to try fix this same issue (which apparently hasn't made a difference) https://github.com/wordpress-mobile/WordPress-Android/issues/8830

90-day impact: ~70 per day
Users affected in the last 90 days: 390
Limited to: Android 7.1.1 and below
https://sentry.io/share/issue/c3c94fd6828449048717840e46df80f8/

I think the next step would be to ask for someone to double check that the permissions are still all good (that they are the way we want them to be and that we aren't giving too few or too many). If all looks well for permissions, and if no one can think of something to add which may help our friends with Android 7.1.1 or less, then we can close this crash as won't fix at that point. Sound good?

I agree with you 100%! it鈥檚 a weird issue we didn鈥檛 find much information on so, maybe it鈥檚 worth spending a couple days really trying to solve it and then if not it鈥檚 probably a good time to let it go

We started seeing this problem as well in our test automation infrastructure. I wonder if something changed in the play store library.

Hi everyone! @malinajirka and I just investigated this issue and in our investigation, it seems this is an issue of the Google client library that's handling referrals. There are several others who are experiencing the same issue in their codebase so we have verification that this is an external issue. https://issuetracker.google.com/issues/70193614

We are already catching the SecurityException as described here https://github.com/wordpress-mobile/WordPress-Android/issues/10532#issuecomment-535638310 as it extends RuntimeException so this isn't actually causing any crashes for our users, so we think it's best for us to revisit this in three months to see if Google has released a fix.

That said, I notice that in the code snippet you're catching the more general RuntimeException instead of just the SecurityException. Is that on purpose? I mean, any particular reason for the catch to be that broad
?

Good point. I wondered this as well. Something that could be looked into.

So yes, we think this is a low priority issue for now. In Sentry it only affects about 40 - 50 users per day and there are 7000 events being sent to Tracks so we should be good.

Thanks for looking into this!

There are several others who are experiencing the same issue in their codebase so we have verification that this is an external issue. https://issuetracker.google.com/issues/70193614

Just to add to it - the linked issue above (https://issuetracker.google.com/issues/70193614) is marked with statusWon't fix (infeasible) as per April 18th, 2019.

The issue currently worth looking in some time in the future seems to be this one https://issuetracker.google.com/issues/72926755 (which has status Assigned).

Nice! thanks for spotting that @mzorz 馃檶

Are you guys seeing this problem on every Android version?
We are only seeing it on API level 23 and 24.

@Macarse Hello there, yes we are seeing it on all android versions. Actually over 85% are android 7 and below.

Noting that we should re-check this in our February 2020 maintenance rotation.

I just checked this out on the google issue. They still haven't resolved it and the last comment was March 2, 2020, so it's still active and others are experiencing the issue so we just have to wait until they get around to it.

Just noting that with this change we are no longer tracking this issue in Sentry. If there is nothing we can do about the issue, I suggest we just close it. If we do want to be tracking this for some reason, let's add the tracking code back in.

cc @mzorz @jd-alexander @malinajirka

If there is nothing we can do about the issue, I suggest we just close it.

Sounds good to me @oguzkocer 馃憤

Was this page helpful?
0 / 5 - 0 ratings