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

Utils.isEmpty or Telaria bidder bug? #5958

Closed
grajzer opened this issue Nov 12, 2020 · 4 comments
Closed

Utils.isEmpty or Telaria bidder bug? #5958

grajzer opened this issue Nov 12, 2020 · 4 comments
Assignees

Comments

@grajzer
Copy link
Contributor

grajzer commented Nov 12, 2020

Type of issue

Bug

Description

utils.isEmpty() function will always return true if integer is passed. isEmpty(1) returns true.

If that's an expected behavior, than there's a bug in telariaBidAdapter and the way it constructs schain string -- hp value 1 will always translate to empty string.

@bretg
Copy link
Collaborator

bretg commented Nov 24, 2020

The first line of isEmpty says that if the argument isn't an object, then it's considered empty.

if (!object) return true;

What schain are you having trouble with in Telaria? I made a test page and see the chain being passed in the URL:

                pbjs.setConfig({
                  "schain": {
                    "validation": "strict",
                    "config": {
                      "ver":"1.0",
                      "complete": 1,
                      "nodes": [
                        {
                          "asi":"indirectseller.com",
                          "sid":"00001",
                          "hp":1
                        }
                      ]
                    }
                  }

Winds up as: &schain=1.0,1!indirectseller.com,00001,,,,

@bretg bretg self-assigned this Nov 24, 2020
@grajzer
Copy link
Contributor Author

grajzer commented Nov 25, 2020

Hi @bretg , thanks for taking a look. Looking at this part of the code:

scStr += `${getEncodedValIfNotEmpty(node.hp)},`;

I think that expected request should look like this:

&schain=1.0,1!indirectseller.com,00001,1,,,

Some publishers noticed and asked why hp value is not passed...

@bretg
Copy link
Collaborator

bretg commented Nov 25, 2020

Adding @telariaEng

This seems odd because node.sid is a string (not an object) and it's showing up.

@bretg
Copy link
Collaborator

bretg commented Dec 9, 2020

Closing since the PR has been merged.

@bretg bretg closed this as completed Dec 9, 2020
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

2 participants