Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Reduce of empty array with no initial value

Open rafaguerrero opened this issue 9 years ago • 6 comments

Type of issue

Bug

Description

I've been trying to update to the latest version of prebid and I've found that some of our users are finding a error: "Reduce of empty array with no initial value". As far as I can see the error comes from the class bidmanager, both functions bidsBackAdUnit and bidsBackAll have a reduce in there that has no initial value.

Steps to reproduce

I've not been able to reproduce it neither in my local environment nor on production. We only have errors logged with this information.

Platform details

We've been using v0.8.1 but we wanted to update to the latest. When we try the upgrade is when we found the error.

rafaguerrero avatar Jan 12 '17 15:01 rafaguerrero

What adapters are you using?

tedrand avatar Jan 12 '17 15:01 tedrand

We had: sovrn, pubmatic, pulsepoint, aol & rubicon. But we wanted to add indexExchange to the list.

rafaguerrero avatar Jan 12 '17 16:01 rafaguerrero

Any luck?

rafaguerrero avatar Jan 24 '17 17:01 rafaguerrero

Is there a page we can access that demonstrates the issue? I'm not able to reproduce.

The reduce without initial value on the flatten operations is not expected to cause an issue unless the array passed to flatten is itself empty. In the bidsBack... functions this should not be the case.

protonate avatar Jan 25 '17 20:01 protonate

I had to revert the latest changes so I don't have a page right now that I can show. Anyway I wasn't able to reproduce it myself, we only have information on the error logs.

rafaguerrero avatar Jan 27 '17 11:01 rafaguerrero

Here's a link with the configuration as I was explaining (It only work on smartphone, emulate before test): http://lab.marfeel.com/www.maduradas.com/index.html

As I said in the previous comment the error is not clear and I was not able to reproduce it on my own.

rafaguerrero avatar Feb 06 '17 09:02 rafaguerrero