googleads-consent-sdk-android icon indicating copy to clipboard operation
googleads-consent-sdk-android copied to clipboard

Consent state resets to UKNOWN after every requestConsentInfoUpdate in 4.4 / KitKat (Samsung N7100)

Open appdeko opened this issue 7 years ago • 11 comments
trafficstars

equals() always returns false:

if (!consentData.getAdProviders().equals(consentData.getConsentedAdProviders()) || hasNonPersonalizedPublisherIdChanged) {
        consentData.setConsentStatus(ConsentStatus.UNKNOWN);
        consentData.setConsentedAdProviders(new HashSet());
      }

Data structure dump from debugger: debug-dump-4.4.txt

appdeko avatar May 24 '18 14:05 appdeko

@appdeko having trouble reproducing on this my end. Would be be able to provide a test project that reproduces this issue?

rampara avatar May 24 '18 18:05 rampara

Hi,

Issue reproduced just on this old test device - either specific android version or vendor related: Samsung Galaxy Note 2 Android 4.4.

My consent implementation is pretty standard and runs OK on other devices or AVDs (including nexus x86 4.4 AVD). Not sure about providing test project anytime soon: bit busy completing GDPR related tasks.

Found other app on PlayStore - https://play.google.com/store/apps/details?id=com.joxdev.orbia which also fails to check saved consent on my 4.4 device (keep asking on every restart, other devices ok).

Will wait for user feedback with similar sgs3 / note2 devices.

appdeko avatar May 24 '18 19:05 appdeko

@appdeko are you still experiencing this issue on the latest version of this SDK (v1.0.2) ?

rampara avatar May 25 '18 00:05 rampara

@rampara issue still persist in 1.0.2 on my old 4.4 device. Could be some weird quirk in Samsung's Dalvik implementation, most likely bytecode-related.

appdeko avatar May 25 '18 13:05 appdeko

@appdeko yes, there seems to be type-erasure happening when it shouldn't. Are you using proguard for your builds ?

rampara avatar May 25 '18 17:05 rampara

@rampara proguard used for release builds only. Tested on both debug and release builds. D8 dexer by default. Tried old DX too, same result.

appdeko avatar May 26 '18 00:05 appdeko

Is this still a issue in 1.0.7 ?

ijm700 avatar Jun 03 '19 18:06 ijm700

Got that issue on XIAOMI MI9 Android 9. It's annoying like hell. My app checks consent during onResume(), so each time the activity (or any) is resumed, I get the consent request. What is going on?

onConsentInfoUpdated() is called with STATUS_UNKNOWN, most of the time. Like 9 times out of 10. One get PERSONALIZED, but then next one gets UNKNOWN again.

What can I do to fix this?

Using: implementation 'com.google.android.ads.consent:consent-library:1.0.7'

3c71 avatar Oct 21 '19 17:10 3c71

FWIW, it happens also on Pixel 3 XL, Android Q. One have to store the user answer because this library is unreliable with regards to keeping user consent properly. I receive UNKNOWN and PERSONALIZED intermittently.

3c71 avatar Oct 22 '19 08:10 3c71

Same here. Started to appear quite suddenly in already released apps. Still persists with the latest version of the library. I've been digging into the code of the library and the consent is correctly deserialized from preferences (containing either PERSONALIZED or NON_PERSONALIZED consent and list of 199 ad providers. However when it's compared with latest server list of providers (also 199 providers), it does not match. Therefore the library says the consent is UNKNOWN. I've checked the lists and first free items match (both class, id, name and privacy policy url), however the 4th position is different. Therefore I believe this is something which can be solved on Google's side. Strange thing - I would expect many more people experiencing this, however I see nothing in user reviews in Google Play :/.

zdenek-horak avatar Oct 22 '19 10:10 zdenek-horak

Yep, seems to be Admob issue (it's providing the list which is alternating between two versions). More discussion hopefully at forum

zdenek-horak avatar Oct 22 '19 10:10 zdenek-horak