Skip to content
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

Pbs bid adapter: video hb_size not returned properly #7020

Closed
ghost opened this issue Jun 14, 2021 · 7 comments
Closed

Pbs bid adapter: video hb_size not returned properly #7020

ghost opened this issue Jun 14, 2021 · 7 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Jun 14, 2021

Type of issue

Bug

Description

There are sizes that returning on video as "undefinedxundefined" on server to server and potentially client side as well. Some bidders choose to send back the playerWidth and playerHeight since sizes are not always returned in the bidresponse. Seems that may Prebid should determine to either filter hb_size when a size is not returned or return the playerWidth and playerHeight as a standard.

Steps to reproduce

Reload page enough time with prebid server and you still see hb_size is not defined properly.

Expected results

I would expect either no hb_size or the size of the actual video.

Actual results

undefined x undefined size or 1x1. Sizes may vary depending on the the adapter or prebid server etc.

Platform details

All version of Prebid.

@patmmccann patmmccann changed the title hb_size not returned properly Pbs bid adapter: video hb_size not returned properly Jun 14, 2021
@gglas
Copy link

gglas commented Jun 21, 2021

@mike-chowla we discussed in issue review today -- we think the insertion of undefined is a bug that needs fixing (and it should just be left blank, maybe console log that size is undefined), but wanted to make sure that fix corresponds with the needs in video.

@bretg
Copy link
Collaborator

bretg commented Jun 21, 2021

@r-schweitzer - a test page would be good. Do you see the 'undefinedxundefined' in the PBS response JSON or is from PBJS?

@ghost
Copy link
Author

ghost commented Jun 28, 2021

@bretg Seems to be related to PBS. I can recreate it on this page https://cafedelites.com/cheesy-scrambled-eggs-in-avocado/. The PBS response doesn't come back with hb_size at all

@bretg
Copy link
Collaborator

bretg commented Dec 3, 2021

@r-schweitzer - spent some time with this and can't make it happen. My thought is that PBS targeting variables aren't used by PBJS. They're only used by mobile apps and AMP. So I don't think PBS is the problem here.

There might be some robustness that we can add to the pbsBidAdapter in

let sizes = bidRequest.sizes && bidRequest.sizes[0];

            let sizes = bidRequest.sizes && bidRequest.sizes[0];
            bidObject.playerWidth = sizes[0];
            bidObject.playerHeight = sizes[1];

We should check sizes before accessing them as an array. @ChrisHuie - please make this update?

something like: if typeof sizes is array, then
bidObject.playerWidth = sizes[0];
bidObject.playerHeight = sizes[1];
otherwise, don't set bidObject.playerWidth and bidObject.playerHeight

@stale
Copy link

stale bot commented Jan 8, 2022

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.

@stale stale bot added the stale label Jan 8, 2022
@bretg bretg removed the stale label Jan 12, 2022
@dgirardi
Copy link
Collaborator

@ChrisHuie the PBS adapter now sets playerWidth / playerHeight to the size that was in the request. Does that solve this issue?

[bidObject.playerWidth, bidObject.playerHeight] = [impReq.video.w, impReq.video.h];

@ChrisHuie
Copy link
Collaborator

Closing this per pr #7885 ->

[bidObject.playerWidth, bidObject.playerHeight] = [impReq.video.w, impReq.video.h];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

5 participants