21

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.

halfer
  • 19,824
  • 17
  • 99
  • 186
NullPointerException
  • 36,107
  • 79
  • 222
  • 382

2 Answers2

3

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.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • 3
    so it's safe to publish the app with this? – NullPointerException Oct 30 '20 at 09:36
  • One probably just needs a version of AdMob, which instead uses a HTTPS URL... and it's about as safe, as the secure cookie not being set through HTTP (which may circumvent the whole idea) - but it is as unsafe as, the URL being plain-text HTTP. It's a lock-out scenario, until the URL would feature a "s". – Martin Zeitler Jul 26 '21 at 13:15
2

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.

talhature
  • 2,246
  • 1
  • 14
  • 28