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

Criteo adapter crashes on video bidRequest if skip is 0 #7307

Closed
muuki88 opened this issue Aug 16, 2021 · 3 comments
Closed

Criteo adapter crashes on video bidRequest if skip is 0 #7307

muuki88 opened this issue Aug 16, 2021 · 3 comments

Comments

@muuki88
Copy link
Collaborator

muuki88 commented Aug 16, 2021

Type of issue

Bug

Description

When the skip property is set to 0 and params.video is undefined then the Criteo adapter crashes.

skip: bidRequest.mediaTypes.video.skip || bidRequest.params.video.skip,

is responsible for this as 0 is falsy, thus triggering the second statement, which doesn't guard against undefined params.

Same goes for startdelay

startdelay: bidRequest.mediaTypes.video.startdelay || bidRequest.params.video.startdelay

Steps to reproduce

{
  adUnit: {
    mediaTypes: {
      video: {
        context: 'outstream',
        playerSize: [ [300, 250]  ],
        mimes: ['video/mp4', 'video/MPV', 'video/H264', 'video/webm', 'video/ogg'],
        minduration: 1,
        maxduration: 30,
        playbackmethod: [2, 3, 4, 5, 6],
        placement:
        api: [1, 2, 3, 4, 5, 6],
        protocols: [1, 2, 3, 4, 5, 6, 7, 8],
        skip: 0
      }
    }
  }
}

Expected results

Criteo adapter doesn't crash if one bid is misconfigured.
Also 0 is a valid configuration option.

Actual results

💥 🎆 💥

Platform details

  • prebid 5.9.0
@leonardlabat
Copy link
Contributor

Hello @muuki88

Thanks for filling the issue, we'll prepare a fix very soon.

@dzhang-criteo
Copy link
Contributor

Hello @muuki88 ,

It should now be fixed so maybe we could close this issue?

@muuki88 muuki88 closed this as completed Aug 25, 2021
@muuki88
Copy link
Collaborator Author

muuki88 commented Aug 25, 2021

Thanks for the quick bug fix 😘

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

No branches or pull requests

3 participants