Closed Bug 936454 Opened 9 years ago Closed 7 years ago

doubleclick backend sniffing breaks - plays adverts only, not video content on Firefox OS


(Web Compatibility :: Mobile, defect, P5)

Gonk (Firefox OS)


(Not tracked)



(Reporter: hsteen, Assigned: karlcow)




(Whiteboard: [mobile-compat-form][lib-brightcove][doubleclick][google][country-us][serversniff][notcontactready])

Site: plays adverts only, not video content on Firefox OS

:: Steps To Reproduce

1. Go to some URL like
2. Click play
3. Watch ad, wait for the real video

There is a loading spinner, but video never plays.

:: Expected Result


:: Actual Result

no video

:: Additional Information

Software Version: 1.1
Reporter's User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:25.0) Gecko/20100101 Firefox/25.0
It uses Brightcove - thought evidently not to play the ads, just to play the actual content :-/
Depends on: brightcove
Ever confirmed: true
Whiteboard: [mobile-compat-form] → [mobile-compat-form][lib-brightcove]
(Fixing the usual sniffing doesn't seem to help here. I'll try to keep digging, for example from onVideoPlaybackAfterAd() in )
Forgot to mention: the problem is that the video (inside Brightcove IFRAME) is display:none and not playing. If you throw in some code to set display:block and call play() it works fine.
Interesting.. adb logcat output contains:

E/GeckoConsole( 6787): [JavaScript Error: "uncaught exception: AdError 900: Invalid usage of the API. Cause: Ads manager is not correctly configured."]

the timing of this error is "perfect" - right when the ad ends. But for some reason it's pretty hard to figure out where the code that throws this error actually lives..

Sometimes I get this error:
E/GeckoConsole( 8107): [JavaScript Error: "ReferenceError: ima is not defined" {file: "" line: 294}]
and then generally no ad plays - but the video works.

In general, the HTML video mode seems to fail in lots of different ways on this site. After disabling Flash in Firefox for Android and Android browser, both of them will start playing only the sound of the video but no image. (Sometimes I've also seen a mode where zooming in/out will make the video image suddenly appear and play). For some reason it's also much more rare to see ads play before the video on Android, don't know if I've ever seen that? If the ad doesn't play, the video works fine also on FxOS.

The various behaviours makes this hard to debug. Though the "incorrect API usage" exception comes from a very obfuscated Google script that lives inside
Hm. This *seems* to be some botched backend sniffing at Doubleclick (!), not FT's fault at all.

It seems this script URL:

<script src=";sz=239x90;a=z1686;a=z887;a=z888;a=z1406;a=z1407;a=z1672;a=z1673;a=z1687;a=J07717_0;14=nor;cn=eur;loc=iezcaizbdfzcfe;uuid=26484c04-8753-11e2-bde6-00144feabdc0;ts=20131114230930;cc=n;brand=short%20view;section=markets;ttid=2838591702001;plid=2228337108001;lnid=69917354001;specialbadging=editorschoice;pos=newssubs;bht=true;rfrsh=false;tile=4;ord=955734860958613?"></script>

will return HTML, not JS, for the Firefox OS user-agent string. This, in turn, will later confuse the Google Interactive Media Ads framework so that it first decides the prepend an ad video before the real video, and then fails to actually play the real video when the ad is done. At least that's the way it looks, since simply spoofing as Firefox on Android for makes all the FT videos play fine on my Firefox OS phone..
Summary: plays adverts only, not video content on Firefox OS → doubleclick backend sniffing breaks - plays adverts only, not video content on Firefox OS
Whiteboard: [mobile-compat-form][lib-brightcove] → [mobile-compat-form][lib-brightcove][doubleclick][google][country-us][serversniff][contactready]
There's a support channel for Google's Interactive Media Ads stuff on Google groups:!topic/ima-sdk/ByqssqMrF8s
Might be a good way to contact Google?
Contacted Alex about it.
Assignee: nobody → kdubost
Alex said on 2013-11-20 "The internal issue ID is #11789992. I'll update this thread with progress."
It still returns the wrong content with text/javascript.


<!-- Template ID = 12077 Template Name = FT Default House Ad -->
<script type='text/javascript'>
var obj = {
    "name": "newssubs",
    "type": "empty",
    "flight": "12699409", // ad ID
    "adId": "13406637889", // creative ID
    "adName": "no ad booked for 239x90"

if (window.FT && && &&
<img src="">


(function() {var avId = 'DfpVisibilityIdentifier_' + Math.floor(Math.random() * 1e16);document.write('\x3cdiv class="GoogleActiveViewClass" ' +'id="' + avId + '" ' +'data-admeta-dfp="5887/,239,90,17653192060730791213,0.02"\x3e');document.write('\x3c!-- Template ID \x3d 12077 Template Name \x3d FT Default House Ad --\x3e\n\x3cscript type\x3d\x27text/javascript\x27\x3e\nvar obj \x3d {\n    \x22name\x22: \x22newssubs\x22,\n    \x22type\x22: \x22empty\x22,\n    \x22flight\x22: \x2212699409\x22, // ad ID\n    \x22adId\x22: \x2213406637889\x22, // creative ID\n    \x22adName\x22: \x22no ad booked for 239x90\x22\n};\n\nif (window.FT \x26\x26 \x26\x26 \x26\x26\n{\n;\n;\n}\n\x3c/script\x3e\n\x3cimg src\x3d\x22\x22\x3e\x3cscript\x3e\nif (\x22newssubs\x22 \x3d\x3d\x3d \x22banlb\x22){\n    FT.env.dfp_targeting +\x3d \x27;li_sync_id\x3d12699409;o_sync_id\x3d102553369\x27;\n};\n\x3c/script\x3e');document.write('\x3c/div\x3e');var avDiv = document.getElementById(avId);if (avDiv) {avDiv['_avi_'] = 'B-bGcgRiqUraKFMLuqgGz_oHIDAAAAAAQATgByAEJwAIC4AIA4AQBoAYg';avDiv['_eos_'] =false;}var glidar = document.createElement('script');glidar.type = 'text/javascript';glidar.async = true;glidar.src = '//';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(glidar, s);})();
still a problem
Hi Ryan from Google here.  I work on the video ads sdk.

First I tried in firefox 29 and I am able to get the configuration error from our ads sdk when I just play this in firefox (after disabling flash).  This may be a problem that is fixable by just correctly configuring the sdk.  However, the playback is not halted on firefox.

It may also be possible that there is some logic in our sdk that is not compatible with firefox OS.

I am going to try to replicate in Firefox OS next.
(In reply to Ryan Thompson from comment #11)
> Hi Ryan from Google here.  I work on the video ads sdk.

Hi Ryan, many thanks for looking into this!

> It may also be possible that there is some logic in our sdk that is not
> compatible with firefox OS.

So, it seemed mostly like a backend (server-side) browser-detection issue, where given URLs would return HTML instead of JS to some User-Agent strings (see comment #5 and comment #9). But the whole behaviour was very confusing and took me a lot of digging ;). If you work on the client scripts, you might be able to figure out easily whether/how the code that expects JS could handle HTML content - but the real bug is probably in the backend sniffing. Hope you'll figure it out much faster than me :)
Can you clarify what you mean when you say backend sniffing.  Do you mean javascript just trying to figure out the browser?  We do have a lot of browser based rules.

I spent a bunch of time trying to figure out what is causing that error (just on the desktop browser), its just quite opaque to me.  As far as I can tell the brightcove player is calling out sdk without initializing the ads manager again after the ad is finished.  This is causing the exception.  Whether or not this is related to Firefox OS I cannot tell.  Are there any other sites this happens on?  All the proxies I've gotten set up are making everything crawl, this page is rarely giving me ads which is what I need to happen in order to replicate the bug?
Hi Ryan,
I thought I'd never complain about a website having too few ads, but does indeed seem to give you a lot of video for way too little ad viewing :-p

Seems something has changed here anyway. Earlier, I would test this by using for example Fiddler HTTP debugger's request composer feature, and request the URL in comment #5 with this User-Agent header:

User-Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0

It would return HTML until I added for example "Android; " before "Mobile" in the string, and JS once I added that token. Returning HTML for a <script> element is obviously pretty broken.

However, I no longer see this problem for that URL. I don't know if that means the ad is outdated and withdrawn, or that the problem is no longer there..
I don't see the problem on Desktop at all (with or without ads) when spoofing as Firefox OS. On device, I was just lucky enough to get an ad video on
and it's hanging before the real video loads.. :-/ But none of the requests really seem similar to the one in comment #5, so maybe I need to look at this again.
Thanks for that link. I *do* see a problem fairly consistently when using a Firefox OS User-Agent on a device. When it occurs, I see the ad run fine, then I get the spinning circle "loading" animation forever. There's a cryptic "element not found" error in the console, referencing some inline script in the brightcove IFRAME I think - I don't understand where this comes from yet..

Going to
I see the advertisement and then a spinning wheel with the second video never starting.

putting the needinfo for my message and hallvord.
Flags: needinfo?(jim.cresswell)
Whiteboard: [mobile-compat-form][lib-brightcove][doubleclick][google][country-us][serversniff][contactready] → [mobile-compat-form][lib-brightcove][doubleclick][google][country-us][serversniff][sitewait]
Hi Karl,

The link you posted works for me showing both the advert and the main video (desktop FF 31.0). I'd suggest sticking to

in order to consistently see an advert.

FYI I'm no longer with the FT but if you need an internal contact I can direct you to some people.
Flags: needinfo?(jim.cresswell)
Hi Jim,

* About Advert: Yes in FF *desktop*, but not in Firefox OS, which is the issue at stake. :)
  User-Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0
* About contact: That would be great!

Thanks a lot.
Flags: needinfo?(jim.cresswell)
No problem,

Robert Shilston is the director of engineering at the FT, if you give him a short description of the problem he will be able to point you to the most relevant person. His email is robert.shilston on the domain.

Flags: needinfo?(jim.cresswell)
As the Doubleclick backend browser sniffing seems fixed, I'm wondering whether the remaining issue may be on our side. "Plays only first video clip, not next" reminds me of bug 1029552 and friends. I'd like to re-test this one when we have a fix over there - marking [notcontactready] for now.
See Also: → 1029552
Whiteboard: [mobile-compat-form][lib-brightcove][doubleclick][google][country-us][serversniff][sitewait] → [mobile-compat-form][lib-brightcove][doubleclick][google][country-us][serversniff][notcontactready]
Hi Hallvord, were you able to retest this? I have a partner, from germany who wants to build a FxOS app, but is also having issue with doubleclick videos when they are played back in the FxOS app.
How could we move this forward?

Thanks, Oliver
(In reply to oduric from comment #22)
> Hi Hallvord, were you able to retest this?

I'm planning to get back to this when bug 1029552 is fixed, and it isn't yet.

 I have a partner, from
> germany who wants to build a FxOS app, but is also having issue with
> doubleclick videos when they are played back in the FxOS app.

I see the problem indeed, very similar symptoms on playback and I'm asking for an update in that other bug.
> How could we move this forward?
> Thanks, Oliver
We're no longer actively following up Firefox OS issues. Closing this.
Closed: 7 years ago
Priority: -- → P5
Resolution: --- → INVALID
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.