Location: Wetpaint Injected Discussion Forum

Discussion: Flash Player UpdateReported This is a featured thread

Showing 1 - 13 of 13  |  Show  posts at a time
evolanding
evolanding
Flash Player Update
Jul 18 2008, 12:59 PM EDT | Post edited: Jul 18 2008, 12:59 PM EDT
On linux, using firefox3 and opera9.5, I am getting 'flash player update' when i click anything that attempts to popup the client application. I am using the most recent version, so no newer versions of available. My coworker is also using the same version of linux (Hardy 8.04) with the same browsers and the same version of flashplugin-nonfree, and it loads fine on his system.

How is the flash version sniffing done? What is being checked to determine that I need a newer version? Something is going wrong somewhere during the check, and I'd like to diagnose it so i can continue developing without using a remote desktop.

Thanks.
Do you find this valuable?    
Keyword tags: errors flash linux
devin_wetpaint
devin_wetpaint
1. RE: Flash Player Update
Jul 18 2008, 8:01 PM EDT | Post edited: Jul 18 2008, 8:01 PM EDT
When WPCAPI.initialize() is called, it attempts to initialize the Flash object used for cross-domain transport with our Injected API server. In ActiveX-enabled browsers, this object specifies a version via the codebase parameter on the object (in this case, codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"). There is no explicit version-checking otherwise.

We throw that Flash Player Update box whenever we can't communicate with that Flash object within a reasonable amount of time for some reason. Typically, this is because of an incompatible Flash version, but this could also happen if the <object> is manipulated in any way after its creation. After manipulating an <object> via DOM methods or otherwise, sometimes the communications channel between the plug-in and the browser is broken.

Is there anything that could be altering the <object>? Anything that uses something like document.getElementsByTagName("object") may be a culprit. Also, some browser plug-ins might block Flash content.

I'm also using Hardy 8.04 / Firefox 3 / flashplugin-nonfree and it's smooth sailing for me. If you PM me the URL you're having trouble with I'll take a look at that and see if I can track something down.

- DC
Do you find this valuable?    
evolanding
evolanding
2. RE: Flash Player Update
Jul 21 2008, 4:00 PM EDT | Post edited: Jul 21 2008, 4:00 PM EDT
Here is a test page. It was created by including the bootstrap and the header JS, along with the html formatted output of a single cell request.

http://www.evolanding.com/wetpainttest.html

on my machine (and apparently, only my machine), clicking any of the client app links generates a 'flash player update' box. Other than wetpaint, my flash version is correctly IDed everywhere, including by the official macromedia flash version detection JS.

No object modification is taking place. My HTTP-ACCEPT header is
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

I tried looking through the code to troubleshoot the error myself, but it appears to be intentionally mangled to prevent any sort of understanding, so after backtracing a few methods, I gave up.

Any suggestions would be greatly appreciated. Thanks.
Do you find this valuable?    
devin_wetpaint
devin_wetpaint
3. RE: Flash Player Update
Jul 22 2008, 12:23 PM EDT | Post edited: Jul 22 2008, 12:23 PM EDT
Hmm... given the rest of the configuration is the same, I'd turn to any browser plugins next. Barring any obvious ones like Flash Blocker, verify the SHA-1 sums of these files:

8fe0f627f769999d1758c3178bb09942fdab66aa http://wapi.wetpaint.com/swf/swfhttp.swf
33116608188d1cd3bad183d61f80bba69865bfd4 http://togo.wetpaint.com/swf/swfhttp.swf

It works for me on http://www.evolanding.com/wetpainttest.html ... are you using the nonfree plugin or the open-source version?

- DC
Do you find this valuable?    
devin_wetpaint
devin_wetpaint
4. RE: Flash Player Update
Jul 22 2008, 12:25 PM EDT | Post edited: Jul 22 2008, 12:25 PM EDT
One other thing to check... verify that you can hit these URLs:

http://wapi.wetpaint.com/crossdomain.xml
http://togo.wetpaint.com/crossdomain.xml
Do you find this valuable?    
evolanding
evolanding
5. RE: Flash Player Update
Jul 22 2008, 12:46 PM EDT | Post edited: Jul 22 2008, 12:46 PM EDT
"Hmm... given the rest of the configuration is the same, I'd turn to any browser plugins next. Barring any obvious ones like Flash Blocker, verify the SHA-1 sums of these files:

8fe0f627f769999d1758c3178bb09942fdab66aa http://wapi.wetpaint.com/swf/swfhttp.swf
33116608188d1cd3bad183d61f80bba69865bfd4 http://togo.wetpaint.com/swf/swfhttp.swf

It works for me on http://www.evolanding.com/wetpainttest.html ... are you using the nonfree plugin or the open-source version?

- DC"
The sha1 sums are fine on my end.

I am using the nonfree plugin. I am going to try with gnash and see if i still have issues.
Do you find this valuable?    
evolanding
evolanding
6. RE: Flash Player Update
Jul 22 2008, 1:58 PM EDT | Post edited: Jul 22 2008, 1:58 PM EDT
Gnash failed also. I removed the flash plugin, then went to youtube and chose to install the adobe flash plugin via the add-ons manager (rather than via apt-get, which is how i did it several times already), and youtube began working. I then tried to load the test page i sent you and received the same error.

Also, the flash update box that pops up is terribly disfigured, so perhaps it is related? Can I post a screenshot somewhere that someone could take a look at? Basically, the easyedit toolbar comes up, which looks normal. It then disappears, and the flash popup resembles a very narrow, tall green bordered rectangle, with a close 'x' at the upper left (but drifting out of the border) and the word Flash Player Upgrade, drifting far off the right border.

I have seen the flash player upgrade box on another machine, and it didn't look like that.
Do you find this valuable?    
devin_wetpaint
devin_wetpaint
7. RE: Flash Player Update
Jul 22 2008, 4:01 PM EDT | Post edited: Jul 22 2008, 4:01 PM EDT
You can post screenshots on your profile page on this wiki, but I've seen the ugly popup as well. It looks different in IE6/IE7/FF2 than it does in FF3... some differences in CSS interpretation no doubt. We'll work on the fit and finish on that soon. Since this popup does not appear until after the communication breakdown, we can rule it out as the cause.

Enable the Firebug console for http://www.evolanding.com/wetpainttest.html and type in the following:

WPC.fU.DEBUG = true;

Then, click the EasyEdit button. Examine the results to see if requests are being fired at all. If you see nothing in the console, then try communicating with the Flash object directly:

>>> document.getElementById("SWFHttpRequest_ControlObject")
function()
>>> document.getElementById("SWFHttpRequest_ControlObject")["New"]
New()

If you get the same output as above, then the Flash object is being initialized properly, but it isn't being assigned properly or it is taking longer than the allotted time to load.
Do you find this valuable?    
evolanding
evolanding
8. RE: Flash Player Update
Jul 22 2008, 4:45 PM EDT | Post edited: Jul 22 2008, 4:45 PM EDT
The request for the control object works, and returns 'function()'. the second one fails, and here is the code relevant to this:

lines 194-208 in getJSApplication.do

WPC.gO.DC=function(id,MB,version,EE,parentNode,backgroundColor){
if(arguments.length<2) return null;
if(!parentNode) parentNode=WPC.tE;
var nk=backgroundColor;
id+="_ControlObject";
var nr=document.getElementById(id);
if(nr) return nr;
nr=document.createElement("div");
if(!nk) WPC.dP.Qg(nr,"WPC-controlObject");
parentNode.appendChild(nr);
nr.innerHTML+='<object id="'+id+'"'+(window.ActiveXObject?' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab'+(version?'#version='+version:'')+'"':
' type="application/x-shockwave-flash" data="'+MB+'"')+(nk?'':' style="width:0px;height:0px;"')+'>'+'<param name="movie" value="'+MB+'"/>'+'<param name="allowScriptAccess" value="always"/>'+(typeof(backgroundColor)==="string"?'<param name="bgcolor" value="'+backgroundColor+'"/>':"")+(EE?'<param name="flashvars" value="'+EE+'"/>':'')+'<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer"/>'+'<param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer"/>'+'</object>';

***up to this point, everything is fine. nr has the correct, expected contents. the problem arises with the next line***

[continued next message]
Do you find this valuable?    
evolanding
evolanding
9. RE: Flash Player Update
Jul 22 2008, 4:45 PM EDT | Post edited: Jul 22 2008, 4:45 PM EDT
[continued from last message]

nr=nr.firstChild;

***after this step, nr is undefined. perhaps, because the innerhtml is added after the element is added to the DOM tree, it isn't added to the DOM model. If I were you, I would add the HTML content before adding the node to the DOM. Is there a particular reason the innerhtml is being changed after the node is added?***

return nr;
};
***returns undefined***

the problem is a simple DOM problem, and seems unrelated to my actual flash settings. Using the web developer toolbar for FF, i viewed the generated source after nr was added to the page and the innerhtml updated, and the html of the page reflected all of this. The error is with the DOM parsing.
Do you find this valuable?    
evolanding
evolanding
10. RE: Flash Player Update
Jul 22 2008, 5:29 PM EDT | Post edited: Jul 22 2008, 5:29 PM EDT
For a bit more insight, check out http://osdir.com/ml/lang.ruby.rails.spinoffs/2006-07/msg00375.html. The solution, if one insists on altering innerhtml after the dom structure has been set, is to add a timeout to rerun the 'grabbing' aspect of the script.

A timeout has been set in getJSApplication.do, but the function it calls is not ever adjusted dynamically, The attempt to grab the first child is done in function WPC.gO.DC, and the function called on timeout is YL(); no matter how many times YL() runs, the transport data has still missed it's one chance to assign the correct array (i could be wrong, but i've been running breakpoints and tracing methods for 2 days now, and i'm starting to see how it works). YL() will check multiple times, but during the loop, no more attempts are made to assign nr from the DOM.
Do you find this valuable?    
devin_wetpaint
devin_wetpaint
11. RE: Flash Player Update
Jul 22 2008, 5:43 PM EDT | Post edited: Jul 22 2008, 5:43 PM EDT
If the first call succeeds, that rules out any DOM errors. It's that second part that is tricky.

The ["New"] property is actually a method exposed by the Flash file. The Flash file can be there, but if its ExternalInterface is unavailable, then attempts to use the object will fail.

Try this URL: http://wapi.wetpaint.com/test/swfhttp/swfhttp.html
For the Remote Access Test, use http://togo.wetpaint.com or http://wapi.wetpaint.com . Other sites will return a 500 status code.

This is a handy little test URL that we used in our early testing. It does not exist on togo.wetpaint.com and will be removed from wapi.wetpaint.com after tomorrow. If it does not work for you there, there may be some persistent Flash security setting on your machine that prevents ExternalInterface from interacting with JavaScript. Also.. that code is self-contained and unobfuscated, so you can save it to your local machine and tweak it if you'd like.

- DC
Do you find this valuable?    
evolanding
evolanding
12. RE: Flash Player Update
Jul 24 2008, 3:41 PM EDT | Post edited: Jul 24 2008, 3:41 PM EDT
I am specifically interested in this piece of code from the clientapplication:
parentNode.appendChild(tV);
208tV.innerHTML+='<object id="'+id+'"'+(window.ActiveXObject?' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab'+(version?'#version='+version:'')+'"':
209' type="application/x-shockwave-flash" data="'+dv+'"')+(jP?'':' style="width:0px;height:0px;"')+'>'+'<param name="movie" value="'+dv+'"/>'+'<param name="allowScriptAccess" value="always"/>'+(typeof(backgroundColor)==="string"?'<param name="bgcolor" value="'+backgroundColor+'"/>':"")+(rk?'<param name="flashvars" value="'+rk+'"/>':'')+'<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer"/>'+'<param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer"/>'+'</object>';
210tV=tV.firstChild;
211return tV;

When debugging with javascript, after clicking the edit button, the innerhtml is set successfully, and after that step, and before the firstchild is executed, that node shows as having no children, despite the innerhtml being set. Thus, the return is null. It tries this twice, and it is null both times, then it quits.

Even if there was an issue with my flash player (which only your JS seems to exploit), I don't understand how firstchild would fail if the debugging shows innerhtml as being set, unless the innerhtml isn't being added to the DOM, instead existing as only a string.

Why do these 4 lines of code fail? Anyone?
Do you find this valuable?    

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)