googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
455 stars 285 forks source link

CORs errors between imasdk.googleapis.com and other ad servers #765

Closed dilburt closed 2 years ago

dilburt commented 6 years ago

Receiving "Access to XMLHttpRequest at from origin 'https://imasdk.googleapis.com' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute." when connecting to ad servers including:

dilburt commented 6 years ago

https://vast.quantserve.com/vast?p=W-zF0QAMffIGrQKzAAjxhmphULN0woC-Xuvp1w&r=&gdpr=0&gdpr_consent=BAAAAAAAAAAAAABABBktB26AAAAAEA&rand=64661&d=H4sIAAAAAAAAAF1TTWjcRhS2tG5ofGkoNG0ChpBik0NXK41-d0Ek2921Sbp27K7XP7mIkWZWmrW0UqTRrrynXltaAqGUQC-92b2FXgo5-dZAofTQXtpLSwgOORTaS0tPndHa1C0MM-_73vfevDc_Cz9eWPj5lYDSJGvUatkYZrSQohhSiDLJi6Pa_RyOqMfocQIJkjXTMmRFrlEcJSGkWCqi8CaPcvI0tMs8S2pzCaywwWkJxbkb4jFOyeCAJ-S8eupcUlecCCMCl9Q24wyPFswCdbYLABxHCceKphmKaTEiI4gRimJoABgMJ6HHBUDXzbpsyYyBaFxqVNnQgaGXTJaOeZTBI9xwn9vMcmYVtGc1A12FbAKDcoLotG4vJN6-NMK0pBGKyjVhgqK01hXNAJKiK6ouS5v95vpWq9nbKl3vntUtnatPV91syhckFzMYp6jEbNJdSiKcUcjaZqjkXeQ57JzPJCVOEUH_EhT6ziBOHS8gIXIQSbFHMXJoiiGN8OhcKB3k8HyiaOajuJi1x65yGSJnQhANbM2SOQgw8QNqA7NElNAQ27dHTo-nj5xtgnDMHShPISXxyJblBhuqvEyjGGEbLE_X2GPKCbJla7jjuD3ZHLjEr-5a9XRrNPHutopsI_OD-l4b9O2Zuul5cT6idlLdlrs06uxttJL7_fWZs8VOxzZUXVGUGdElI8yrBaZ1quCdY1tRTVMz65cevxTemmu8AZOE3WVZZK2oRgn2--93Gwtj3kFN9ZOksfhfSRbE3v4EjnF1EMIsaFycSaNEa1w-rxxC9pC8lCT0LNsEu9HrX4qX5q5e72Ifhk4vDnOuzZyNFHqURYZOF04cICvWtZNfl298drQof_PhVuPNs484zKRyj4Kk_NPcu1G_M7kTOMNue2-aFc2DTrLW7w03yL3ddTc72AardcvvQSsp8ge3zJsfCCcf_9H5QhCOhO8-_WT-ibDYanZ6ndWdu9tas-1XDQu2kvrE0OBKPGkox8K3xyeVp8Lffz48_P2dn4TLO9XpirzZXBsMbq-mm-9NV_1hEfjPhZ29-q0XAngkHj54-0i88Fh89Yk4v7BbqR2L4lNx7nvx-VdfP3v2w-eHvwm_iHN_icJHlSuabipSkrtVy1BNwH6LBUxD14D6sDLPfY8qwtUyx_XX_nff_wBzaMbxmwQAAA&h=PXbeJiu-zMtxqu0L7oqHDDmnGM8

and the server in the following image from VAST Validator:

screenshot 2018-11-14 15 52 14

dilburt commented 6 years ago

In the above image you will notice it has also logged: "Uncaught (in promise) DOM Exception: Play() failed because the user didn't interact with the document first. This is happening in a large number of VPAID ads even though the ads are set to muted autoplay. I know this is a separate issue but would like guidance on whether this should be logged. It seems like an ad error since it only happens in some VPAID ads but I'm not sure how the ad could affect this so I will log it if you think it's potentially an SDK issue.

mysuf commented 6 years ago

This is not IMA SDK issue. Issue is on ad publisher side (vast.quantserve.com). They should include imasdk.googleapis.com explicitly in Access-Control-Allow-Origin header, because IMA SDK does not accept wildcard (and its exactly what error says).

dilburt commented 5 years ago

Solving this with ad publishers.

red1 commented 5 years ago

Hello I'm having the same issue with the sample test tag : https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator= I'm injecting a videojs player with the google ima sdk on a page. Could someone help me please ?

munkhbato commented 5 years ago

@red1 i also have the same error but the ad is playing. I had to comment out autoPlayAdBreaks: false in my ima options to make it play

webdevinci commented 2 years ago

@red1 Same issue here after changing the network code for our GAM account... wouldn't google be responsible for fixing this?

Kiro705 commented 2 years ago

Hello all,

Let me reopen this issue, otherwise additional comments may go unnoticed.

Are there any steps to reproduce this error using the sample apps?