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

datablocksBidAdapter: Cannot read properties of undefined (reading 'body') on Chrome #11319

Open
igor322 opened this issue Apr 10, 2024 · 2 comments

Comments

@igor322
Copy link

igor322 commented Apr 10, 2024

Type of issue

Bug

Description

The function getUserSyncs in the datablocksBidAdapter is throwing the following error after every action ends:
TypeError: Cannot read properties of undefined (reading 'body')

Platform details

Prebid version: v8.42.0
Browser: Chrome (Version 123.0.6312.58 (Official Build) (arm64))
Node: v16.20.1 and v20.11.1
OS: Mac

Other information

It doesn't happen on edge

@dgirardi
Copy link
Collaborator

FYI @htang555

@jefftmahoney
Copy link
Contributor

It looks like in most other adapter implementations, the code first checks to see if a response is even present (e.g. if (responses[0].body) etc.), while no such check is made with the datablocksBidAdapter:

  getUserSyncs: function(options, rtbResponse, gdprConsent) {
    const syncs = [];
    let bidResponse = rtbResponse[0].body; // <- making an assumption the response is not undefined
    let scope = this;

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

No branches or pull requests

3 participants