Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strict Secure Cookie policy error in Admob after updating to Android 11

After updating my app to compile with API level 30 (Android R, 11), I can't see AdMob test ads, and I'm receiving this error in the log:

Strict Secure Cookie policy does not allow setting a secure cookie for http://googleads.g.doubleclick.net/ for apps targeting >= R. Please either use the 'https:' scheme for this URL or omit the 'Secure' directive in the cookie value.

I'm using the last AdMob version, and I don't have "org.apache.http.legacy" references in Gradle or manifest.

like image 587
NullPointerException Avatar asked Oct 30 '20 09:10

NullPointerException


Video Answer


2 Answers

This might come from the webview cookie_manager.cc.

Also this: https://www.chromestatus.com/feature/5633521622188032

Same question here: How to resolved http and Site Behavior: Navigation error in android app?

It might be temporarily broken, unless they'd set the cookie as expected.

like image 61
Martin Zeitler Avatar answered Nov 01 '22 23:11

Martin Zeitler


I'm using flutter and I'm facing the same issue while implementing banner test ads. Just add the below in android manifest file under application:

android:usesCleartextTraffic="true"

and issue will be resolved.

like image 31
Sameer khan Avatar answered Nov 01 '22 23:11

Sameer khan