0

I am working on a JS wrapper with prebid.js and googletags, and I am having a very weird issue. I am new to prebid and googletags and ads, so I might just be missing a small detail, but here we go:

I noticed that prebid didnt seem to get any response when running pbjs.requestBids(). It also never times out, even with the timeout set very low.

I tried to isolate the problem from my wrappers code, so I took the example code prebid has in their docs, and simply inserted my values into the adUnits variable. Even tho everything looks right, it still causes the same issue as before. No response, no timeout. Nothing. It eventually results to timing out all of prebid with the-

// in case PBJS doesn't load
setTimeout(function() {
    initAdserver();
}, FAILSAFE_TIMEOUT);

-section.

I have installed the Professor Prebid extention, and there is absolutely nothing in there. Looks like prebid did not even start, but the console clearly shows that it has started up.

I have tried using only one single bidder in my Prebid.js, same issue.

The rest of the example code is left unmodified, and it works with the default values, so it must be something in my adunit code causing the weird issue, right?

TLDR: Is there a known issue that can cause pbjs.requestBids() to not respond at all?

isak
  • 1
  • could you share your full code ? – rabsom May 09 '23 at 07:25
  • @rabsom Im afraid I cant share too much, its an internship job and I am using some keys and values that Im not allowed to share. Is there a specific part of the code that you want to see? – isak May 09 '23 at 14:07

2 Answers2

0

if the FAILSAFE_TIMEOUT is triggering, this means that something went very wrong, could be that Prebid.js failed to load completely (pbjs might be undefined from the library) or there is major problem with you configuration that is preventing the code from completing it's callback. It's hard to say without seeing the full code snippet.

Do you get any PBJS debug output? (enable using pbjs_debug=true in the query string of the URL you loading).

JavaKungFu
  • 1,264
  • 2
  • 11
  • 24
0

If you don’t share some code it is difficult to find out the issue. At least using the pbjs_debug=true or even better use the pbjs.setConfig({debug: true}) (it works in iframes too) in order to see what is wrong and maybe share the issues. Also, this header bidding setup of yours is the “header bidding” example of the prebid page, try to see what differences you got when compared with the example.

  • add back tickmarks around code – juanesarango Aug 16 '23 at 15:56
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/34844578) – Miss Skooter Aug 17 '23 at 11:40