react-dfp
react-dfp copied to clipboard
Invalid arguments: PubAdsService.refresh([]).
Version: 0.20.0
When calling DFPManager.refresh();
in a useEffect
I get the following error google tag console:
Edit:
When I pass a slot id it correctly refreshes that slot. The docs mention that you do not need to explicitly set the slot to refresh. Is this a bug or maybe I have configured something wrong.
I don't know if this is related, but I found the functionality to refresh ad has changed in recent version. Instead of passing gptSlot
as expected by PubAdsService, it is now passing slotId
.
https://github.com/jaanauati/react-dfp/blob/e5b46729e1b92178027008c849440f15fb0edde6/js/manager.js#L360-L362
This used to work up to version 0.20.0:
https://github.com/jaanauati/react-dfp/blob/126d4fea858ba34982d76e752b7a374ac58698fb/js/manager.js#L356-L359
@squgeim thanks for diagnosing the issue.
@daraclare can you take a look at this bug. I tried updating to the latest version and am getting this error as well.
@jaanauati Please inform us on any updates for the deprecated google functions, we are facing the same warnings in our project.