-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when switching sites: availableWidth=0 #17
Comments
I made this error to go away by setting // for my banner ads
format="horizontal,auto"
// for my sidebar ads
format="rectangle,auto" Setting just |
This makes te error goes away, just like the ads... |
For me, it happens on a refresh with a non-home page, and only when an ad-blocker is active. |
Same problem here. For me, it happens when tried to put an ads 300px X 50px (Mobile Version in the bottom) and with other ads this works! |
Insert the script before |
I've found this error usually happens with my responsive ads if the ad is hidden by css when mounted. (e.g. by using In my case I needed to add/remove the css classes that show/hide child ad units before mounting the ad units. I did this work in the parent component's Also note I'm not actually using this lib, but my setup seems very similar to this lib and I came across this ticket when debugging my own problem. Hope it helps. |
I was in the same situation that I ended up just catch the error and suppress it, since this error is not so important, but causing our App to crash.
(I no longer use this library and just rewites https://github.com/hustcc/react-adsense/blob/master/src/google.jsx into functional component.) |
I get this error on every first load of the page. On any other re-mount or reload it will work.
I set min-width for the container of the add. But i think the problem is, that "window.adsbygoogle = window.adsbygoogle || []).push({})" starts to early, not after finished load of the page.
message: "adsbygoogle.push() error: No slot size for availableWidth=0"
name: "TagError"
pbr: true
stack: "TagError: adsbygoogle.push() error: No slot size for availableWidth=0↵ at Zg (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:17:7433)↵
The text was updated successfully, but these errors were encountered: