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

Broken Resizing For Native #12094

Closed
JamaicanSwede opened this issue Aug 6, 2024 · 0 comments · Fixed by #12096
Closed

Broken Resizing For Native #12094

JamaicanSwede opened this issue Aug 6, 2024 · 0 comments · Fixed by #12096

Comments

@JamaicanSwede
Copy link

JamaicanSwede commented Aug 6, 2024

Type of issue

Bug

Description

Whilst updating Prebid from 8.32.0 → 8.52.0 we noticed the resizing functionality was broken for all of our native ads:

image

In the image, the height of the ad would previously be resized to 50px. However, now it's always static at 600px. We have the same resizing issue across all website that utilizes native.

We investigated the issue, and we concluded that there was a bug introduced in the version 8.52.0 of Prebid. In this version, in the file secureCreatives, a new function was introduced: getResizer. See: https://github.com/prebid/Prebid.js/compare/8.32.0...8.52.0?diff=unified&w=#diff-46212f953e474e4bccd13c2ca036cd27698fcd13fdba21276129f3646d9e3561R72-R79

The function expects two arguments, however not all invokers have been updated accordingly, as in the case of the native invoker handleNativeMessage (located in the same file)

Consequently, the adId argument is now instead the bidResponse object, which subsequently breaks the resizing functionality.

Suggested solution

We tried setting the right arguments in the invoker: handleNativeMessage(data, adObject, {resizeFn: getResizer(data.adId, adObject)}) and the resizing started to function as expected again.

Platform details

Prebid version: 8.52.0

Other information

EDIT: I just saw that someone else just created a PR before me to resolve the issue, please review it: https://github.com/prebid/Prebid.js/pull/12096/files

@JamaicanSwede JamaicanSwede changed the title Broken Resizing For Native Draft: Broken Resizing For Native Aug 6, 2024
@JamaicanSwede JamaicanSwede changed the title Draft: Broken Resizing For Native Broken Resizing For Native Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

1 participant