googleads / googleads-consent-sdk-android

Consent SDK
https://developers.google.com/admob/android/eu-consent
Apache License 2.0
100 stars 82 forks source link

GDPR Could not parse Event FE preflight response with consent-library:1.0.6 #94

Open VasilisKatsoris opened 5 years ago

VasilisKatsoris commented 5 years ago

This issue has been previously closed as it should not happen in the new version. But it does and I am using consent-library:1.0.6 . So that's why I m opening a new one. I run the following code and I get "GDPR Could not parse Event FE preflight response." error. I have tried puting the ca-app- prefix in publisher id. I have tried running it in a background thread or running it some time after the app opens. Always the same error.

My app is ready to publish and I cannot proceed because of this error. How is this fixed?

ConsentInformation consentInformation = ConsentInformation.getInstance(getActivity());

            String[] publisherIds = {"pub-**********~***********"};
            consentInformation.requestConsentInfoUpdate(publisherIds, new ConsentInfoUpdateListener() {

                @Override
                public void onConsentInfoUpdated(com.google.ads.consent.ConsentStatus consentStatus) {

                }

                @Override
                public void onFailedToUpdateConsentInfo(String errorDescription) {
                   Log.e("GDPR "+errorDescription);
                }
            });
bilaloz commented 5 years ago

I get error too . Did you find the error solutions

Izzyjm commented 5 years ago

Have you tried updating to 1.0.7 ?

lachtos commented 5 years ago

Same problem for me on 1.0.7

While debugging, I found that it fails due to ConsentInformation.ServerResponse.companies being null. What could that mean?

lachtos commented 5 years ago

OK, found the problem, at least in my case it was my fault. I was sending the admob app id instead of the account's publisher id. It's a bit confusing as to which ones should be used where since the app id includes the publisher id, and I had totally forgotten that one exists. Moreso, consent sdk for iOS does not throw an error when using app id, so inconsistent behaviour.

Maybe as a quality of life improvement the SDK could extract the publisher id from the app id? Or at least a warning message/error could be thrown if it detects that an app id was passed :)

chebum commented 4 years ago

The error may appear if your AdMob account isn't yet approved. Wait until the "Under Review" message disappear and try again.