Some times I get this error in my console
Failed to load resource: the server responded with a status of 400 ()
And some times there is no error!!
I heard that it takes some time to show up the ads! But even in localhost I have to wait?
here is the code:
<!-- inside header -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
</script>
<!-- at the place where I want to show -->
<ins class="adsbygoogle"
style="display:inline-block;width:336px;height:280px"
data-ad-client="ca-pub-XXXXXXXXXXXX"
data-adtest="on"
data-ad-slot="XXXXXX">
</ins>
<!-- inside scripts tag -->
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
my references: Is Google adsense available for localhost?