question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Bug report

Native ad cause crash app on simulator Android, API 30

Describe the bug https://stackoverflow.com/questions/64605612/strict-secure-cookie-policy-error-in-admob-after-updating-to-android-11

Steps to reproduce

Steps to reproduce the behavior:

  1. Config native ad as codelab https://codelabs.developers.google.com/codelabs/admob-inline-ads-in-flutter#7
  2. Run app on Android simular with API 30

Expected behavior

Firstly app run success but after 3s it was crash and throw the error:

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.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:10
  • Comments:21

github_iconTop GitHub Comments

1reaction
erickcchoicommented, Apr 27, 2021

Exact same issue here, Hope them to fix the problem asap.

0reactions
QFREYcommented, Sep 26, 2022

This is the solution

Go to android -> app -> src -> main -> AndroidManifest.xml

Paste this in the AndroidManifest.xml in the application tag android:usesCleartextTraffic="true" it should look something like this when you are done

    <application
    android:label="Your app name"
    android:name="${applicationName}"
    android:icon="@mipmap/ic_launcher"
   android:usesCleartextTraffic="true">

this will make no difference in the emulator if you want the emulator to work as well do the following

go to android -> app -> src -> debug-> AndroidManifest.xml

open the AndroidManifest.xml then you have to add this code below the manifest tag

<application android:usesCleartextTraffic="true"/>

Now the ads will work in the emulator as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strict Secure Cookie policy error in AdMob after updating to ...
Please either use the 'https:' scheme for this URL or omit the 'Secure' directive in the cookie value. I'm using the last AdMob...
Read more >
ERROR:cookie_manager.cc(137) - Google AdMob Community
I am testing Admob ads, and I keep getting error message, says: E/chromium: [ERROR:cookie_manager.cc(137)] Strict Secure Cookie policy does ...
Read more >
Mobile Ads SDK Forum Advisor - Google Groups
[ERROR:cookie_manager.cc(137)] Strict Secure Cookie policy does not allow setting a secure cookie for http://googleads.g.doubleclick.net/ ...
Read more >
Behavior changes: Apps targeting Android 13 or higher
If your app does not declare this permission when targeting Android 13 or higher, the advertising ID is automatically removed and replaced with...
Read more >
Websites say cookies are blocked - Unblock them | Firefox Help
Check cookie settings · If Standard is selected, this is the default setting and, except for trackers, all cookies are enabled. · If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found