Closed spormeon closed 5 years ago
What bidders are you using? This is a specific error inside of a bid adapter.
Given those bidders I would have to guess the issue stems from the recent changes to the 33acrossBidAdapter
in #3944
Specifically the unsafe access of adapterState.uniqueSiteIds.map
here.
You can try removing that bidder to see if that fixes your issue.
cc: @curlyblueeagle
ye, it was 33across, any fix for it?
actually the error is only there when using 33across S2S, bring it client side and the error goes away
The immediate fix would probably be adding safe lookup to check for an undefined
property, however the bug highlights a more serious code smell in that shared state is being stored outside buildRequests
and getUserSyncs
. This pattern could lead to unexpected behavior depending on run order (in this case I think you may be using prebid-server so buildRequests
is never called since there are no client requests?) but also could cause edge case bugs around concurrent auctions.
The code should probably be refactored to only operate on function parameters instead of shared closure state. I cc'd @curlyblueeagle as this is a fix they'd probably have to make.
ok, yes using prebid-server. One other odd thing noticed, is 33accross makes bids on S2S and is quite often the highest bidder but it never wins a bid or renderers an ad
@snapwich we could fix the bug in the short-term by adding a safe lookup check. But we are forced to use shared state because we require parameters from all bid requests during user sync. I believe the utils library used to expose a method to obtain this during pre v1 days, but no longer. We tried to do user sync during interpretResponse
#2024 , but that wasn't the ideal solution since we wanted to delink usersyncing from auction for the sake of performance. So we implemented the shared state in #2899.
Do you have a recommendation on how we can obtain params to bidrequests safely via a function?
I believe most bidders return custom sync urls in their bid responses if they require custom sync data (beyond cookie data). You could do the same.
copying @thomas-33across since he will be following up on this issue.
hmm @thomas-33across says he is unable to add comment to this thread. Why?
Hello @spormeon can you tell me your prebid.js setup page so I can try to reproduce the issue and make the code change? Thank you
@thomas-33across unfortunately not, as its on test pages behind logins, where i test out new prebid releases not live sites
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
started getting this in v 2.20 onwards, not a clue what it is: Uncaught TypeError: Cannot read property 'map' of undefined at Object.getUserSyncs (prebid2.25.0adyjs.js:4) at Object.p [as registerSyncs] (prebid2.25.0adyjs.js:3) at prebid2.25.0adyjs.js:26 at Array.forEach ()
at prebid2.25.0adyjs.js:26
at prebid2.25.0adyjs.js:26
at Object.success (prebid2.25.0adyjs.js:26)
at XMLHttpRequest.onreadystatechange (prebid2.25.0adyjs.js:3)