-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Pr #8626 breaks prebid when publisher is using the bluebirdjs module #8903
Comments
The first link says not to use bluebird on modern browsers. Prebid 6.x+ is only for modern browsers. 'Currently - it is only recommended to use Bluebird if you need to support old browsers" |
Apologies closed by pressing the wrong button, but i don't expect we will be fixing this. We released instructions on prebid 6 on how to load old prebid for old browsers . Your potential contribution of a workaround is welcome however! |
I believe the error wouldn't happen if Prebid is loaded before bluebird. Would that be a viable fix? If not, another option could be to have Prebid look for say <script>
window.pbjs = window.pbjs || {}
window.pbjs.Promise = Promise;
</script>
<!-- load bluebird, prebid, etc --> |
Thank you very much for replying! Unfortunately, the chances that the publisher can make such changes that bluebird is removed from their sites is not a possibility right now as it would requite to large rewrites (which is planned, but won't be ready for a pretty long while). Also, sticking with older versions of Prebid is not an option either and fact is that it has worked flawlessly up until this change so if this one could be solved it would help a lot. The suggestion to ensure that Prebid is loaded before bluebird: Unfortunately I don't think that's possible since the actual loading of the site would be delayed by the loading of Prebid.js (which would in that case need to be loaded synchronously I believe). Your other suggestion, defining "window.pbjs.Promise = Promise" may be a solution that's possible to implement. Let me check that! |
After trying some trickery to redirect and inject scripts on https://www.gp.se/ I think the approach will work - if you are able to preprend that snippet before both Prebid and Bluebird, using this pr. |
@dgirardi great, thank you very much! The update is on it's way, we'll try it out but it looks like it should work. Thanks again! |
Type of issue
Pr #8626 breaks prebid when publisher is using the bluebirdjs module. (https://github.com/petkaantonov/bluebird/)
Description
The bluebirdjs doesn¨t allow "promise" to be subclassed, throwing an error and halting prebid. http://bluebirdjs.com/docs/error-explanations.html#2.-you-are-trying-to-subclass-promise
Steps to reproduce
The easiest way would probably be to use a proxy to redirect https://content.lwadm.com/lw/6.26.0/prebid.js to a version of prebid.js >= 7.7.0 on the site https://www.gp.se.
Test page
See above
Other information
Unfortunately, the publisher using this module cannot remove it or fix the problem easily. I also realize it may not be in the interest of Prebid.org to fix issues specific to a publisher, but I could imagine this might be a problem for more publishers out there + there might be other modules causing similar issues. Also, the publisher is not a small one and not being able to upgrade beyond 7.6.0 will be a major issue. Though we can create a custom branch removing the new functionality, it's not really sustainable in the long run.
One suggestion is to add a config setting to control whether this extended version of promise should be used or not if the problem can't be fixed on the Prebid end?
The text was updated successfully, but these errors were encountered: