Last Comment Bug 432371 - Silverlight not working on MLB site.
: Silverlight not working on MLB site.
Status: RESOLVED WORKSFORME
:
: relnote, testcase
Product: Tech Evangelism
Classification: Other
Component: English US
: unspecified
: All All
: -- normal with 2 votes (vote)
: ---
Assigned To: english-us
: english-us
: http://mlb.mlb.com/mlb/gameday/index....
:
:
  Show dependency treegraph
 
Reported: 2008-05-05 19:49 PDT by Leon Sha
Modified: 2009-04-08 06:46 PDT (History)
26 users (show)
See Also:
Crash Signature:


Attachments
zipped testcase (6.95 KB, application/zip)
2008-05-06 14:37 PDT, Brian Polidoro
no flags Details
minimzed testcase (356 bytes, text/html)
2008-05-07 10:59 PDT, Brian Polidoro
no flags Details
Minimized testcase take 2 (425 bytes, text/html)
2008-05-07 11:12 PDT, Brian Polidoro
no flags Details
Same testcase except using embed instead of object (351 bytes, text/html)
2008-05-07 11:19 PDT, Brian Polidoro
no flags Details

Summon comment box

Description Leon Sha 2008-05-05 19:49:57 PDT
Go to mlb site, select a live game and enter game day. Try to play a video there.
Expect result: The video start to play.
Actual result: There is nothing in the media box.

It works on firefox 2. And for firefox 3 beta 5, it will tell you that silverlight is not installed. But for nightly build, there is nothing.
Also you can see this site.
http://preview.microsoft.com/video/
It is work on firefox 2.
Comment 1 Brian Polidoro 2008-05-06 07:52:39 PDT
works 20050921
broke 20050922

Then it looks related to bug 1156. But I wonder if it's the a problem with the site.  Other Silverlight sites still work.  

This is the same regression range I found in bug 421217 Comment #46.  I just retried those builds for this case.  But this issue is separate from that bug. 
Comment 2 Jonas Sicking (:sicking) 2008-05-06 11:46:01 PDT
There is a chance that this has been fixed since beta 5, so if you could retest that would be awesome.

I do think we should look into this and see what the tag the site is using that no longer works.

However I don't think we should block on this unless we hear of more sites broken over this.
Comment 3 Brian Polidoro 2008-05-06 14:32:34 PDT
I'm using today's build so no change since beta 5.

But I have a testcase.  I compared the silverlight.js between a site that works and one that does not work.  They are different.  And I reconfirmed my regression range with my testcase.
Comment 4 Brian Polidoro 2008-05-06 14:37:02 PDT
Created attachment 319653 [details]
zipped testcase

I used the quickstart to create a testcase with the silverlight.js taken from the sites.  
http://www.silverlight.net/quickstarts/silverlight10/FileSetup.aspx

There are two js files: silverlight-broke.js and silverlight-works.js.  Rename one to silverlight.js to work with the testcase.
Comment 5 Brian Polidoro 2008-05-07 08:32:54 PDT
Ok I dove into this some more by trying Firebug(1.1b12) for the first time.  It was easy enough to use as a visual studio user.  

The difference that seems to count here between the silverlight.js files is the isInstalled function.  The one that works tests loading the plugin with an embed.  While the other tests with an object.  They both call IsVersionSupported on the plugin with 1.0 as the in parameter.  In the failing case it seems like it returns false.  But when I try to step through with Firebug it returns true and the plugin gets loaded but the xaml file is not loaded so the area on the page for the plugin ends up as a white block which uses the silverlight context menu.  So the plugin is loaded. But that only happens when I step into the isInstalled function with Firebug.  

So I assume that the IsVersionSupported function return is the reason IsInstalled returns false.  I encountered no exceptions when stepping through the IsInstalled function.  But why is the IsVersionSupported returning false when not stepping through the IsInstalled function and returning true when stepping through the function? That's the strangest part.  Also is the plugin returning false in that case from IsVersionSupported or is the function call failing and returning false?  Or would that throw an exception if the IsVersionSupported function call failed?  

Jonas who can dig deeper into this?  The bottom line is why does using the object tag work in FF2 and not FF3?  The embed tag works in both. Changing the UA string to a Firefox UA string instead of a Minefield UA string makes no difference.  

This likely looks like a plugin issue.  But with the NBC Olympic site set to use Silverlight for their videos.  It would not be nice if those videos did not work in the recently released FF3 come this August.  If it's a plugin issue so be it.  Plus we don't know it they will use the Silverlight.js that works or the one that doesn't.  Heck it's possible they will be using Silverlight 2.  
 

Comment 6 Brian Polidoro 2008-05-07 10:59:40 PDT
Created attachment 319814 [details]
minimzed testcase

Ok I'm getting closer.  This testcase fails by throwing an exception.  But if you remove the comment from the alert(b); line then the testcase passes.  So I guess it's a timing issue. Which must be why it was passing when I was stepping through with Firebug. But that looks about as far as I can go.  I don't know what to make of the timing issue.
Comment 7 Brian Polidoro 2008-05-07 11:07:53 PDT
Comment on attachment 319814 [details]
minimzed testcase

Ugh that tescase fails because childNodes[0] is a text node in that case.
Comment 8 Brian Polidoro 2008-05-07 11:12:08 PDT
Created attachment 319820 [details]
Minimized testcase take 2

This should be the one.  It also involves innerHTML.
Comment 9 Brian Polidoro 2008-05-07 11:19:22 PDT
Created attachment 319822 [details]
Same testcase except using embed instead of object

This testcase works.  Which is why the one silverlight.js works.
Comment 10 Jonas Sicking (:sicking) 2008-05-07 17:51:12 PDT
So the problem is the following lines of code:

a.innerHTML='<object type="application/x-silverlight"  data="data:," />';
var b=a.childNodes[0];
alert(b.IsVersionSupported('1.0'));

By the time we reach the call to b.IsVersionSupported('1.0') we have started the load, but not yet received any data. That means that mType is eLoading, which results in nsObjectLoadingContent::EnsureInstantiation returning early and thus no plugin is instantiated. So no 'IsVersionSupported' function will exist, and so things fail.

Things have worked this way since bug 1156 got fixed in Sep-2005.

There are ways we could fix this, however given that we're just a few days from shipping RC1, and that we haven't heard much about this in the past 2.5 years, I think we should try to evangelize instead.

So note that the silverlight plugin does work fine, it's the silverlight detection script (which looks like it was shipped from MS) that breaks in FF3.

I should also note that there is nothing silverlight specific going on here, so it's possible that scripts for other plugins break over this too.
Comment 11 Jonas Sicking (:sicking) 2008-05-07 17:54:15 PDT
Nominating to get on the radar. I don't really think we should block at this point, but more people should be in on that decision.
Comment 12 Mike Schroepfer 2008-05-07 18:30:24 PDT
(In reply to comment #10)
> So the problem is the following lines of code:
> 
> a.innerHTML='<object type="application/x-silverlight"  data="data:," />';
> var b=a.childNodes[0];
> alert(b.IsVersionSupported('1.0'));
> 
> By the time we reach the call to b.IsVersionSupported('1.0') we have started
> the load, but not yet received any data. That means that mType is eLoading,
> which results in nsObjectLoadingContent::EnsureInstantiation returning early
> and thus no plugin is instantiated. So no 'IsVersionSupported' function will
> exist, and so things fail.
> 
> Things have worked this way since bug 1156 got fixed in Sep-2005.
> 
> There are ways we could fix this, however given that we're just a few days from
> shipping RC1, and that we haven't heard much about this in the past 2.5 years,
> I think we should try to evangelize instead.
> 
> So note that the silverlight plugin does work fine, it's the silverlight
> detection script (which looks like it was shipped from MS) that breaks in FF3.
> 

Agreed -  I think we should get folks to update the detection script.  What change can they make?
Comment 13 Mike Beltzner [:beltzner] 2008-05-07 18:39:16 PDT
Would we block on getting that script detection changed? I don't think so, and recommend blocking-.
Comment 14 Jonas Sicking (:sicking) 2008-05-07 18:59:30 PDT
I think they can simply switch to <embed> while testing. Will investigate that and other options tomorrow.
Comment 15 Johnny Stenback (:jst, jst@mozilla.com) 2008-05-07 20:16:13 PDT
An alternative approach for detecting whether the Silverlight plugin is installed would be to check if navigator.plugins["Silverlight Plug-In"] is defined, and then they could check if the .description property contains the right version (which is something the silverlight plugin happens to expose through .description).
Comment 16 Boris Zbarsky (:bz) 2008-05-07 21:18:58 PDT
Yeah, that's exactly why navigator.plugins exists.  I'm not sure why people decided to base detection on undefined behavior instead....
Comment 17 Mike Schroepfer 2008-05-08 08:12:09 PDT
Taking off nom list
Comment 18 Brian Polidoro 2008-05-08 11:28:31 PDT
(In reply to comment #15)
> An alternative approach for detecting whether the Silverlight plugin is
> installed would be to check if navigator.plugins["Silverlight Plug-In"] is
> defined, and then they could check if the .description property contains the
> right version (which is something the silverlight plugin happens to expose
> through .description).
> 
They do the first part but not the second part.  Here's a snippet:

if(Silverlight.ua.Browser=="MSIE")
  b=new ActiveXObject("AgControl.AgControl");
else if(navigator.plugins["Silverlight Plug-In"])
{
  a=document.createElement("div");
  document.body.appendChild(a);
  if(Silverlight.ua.Browser=="Safari")
    a.innerHTML='<embed type="application/x-silverlight" />';
  else 
    a.innerHTML='<object type="application/x-silverlight"  data="data:," />';
  b=a.childNodes[0]
}
document.body.innerHTML;
if(b.IsVersionSupported(d))
  c=true;



Comment 19 Jeff Walden (remove +bmo to email) (gone August 18-September 4) 2008-05-17 17:36:17 PDT
This probably should be mentioned in release notes since it's a fairly big site and all and the script might be have moderately widespread use.
Comment 20 Hasham 2008-05-31 13:55:39 PDT
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0

This seems to be a problem with Silverlight 1.0 and 2.0 beta. The MLB.tv website won't play videos for either. Other websites such as the http://preview.microsoft.com/video/ can't seem to recognize if Silverlight plug-in is installed or not. They keep asking to install it even if its already installed.
Comment 21 Raymie Humbert 2008-06-04 19:48:39 PDT
Is there a way to modify the scripts or script routines so that they work?
Comment 22 Ryan Nelson 2008-06-05 09:27:22 PDT
I'm a sysadmin at mlb.com (*not* a javascript person) ... if someone can suggest a server-side remedy, I can promote it to the mlb QA or content-creation departments, or put a mozilla developer in touch with them directly.
Comment 23 Raymie Humbert 2008-06-06 16:32:00 PDT
Silverlight 2.0 beta 2 is out, though the Mac OS X version is nowhere in sight for me.

Would someone with Windows check?
Comment 24 Boris Zbarsky (:bz) 2008-06-06 16:37:49 PDT
Ryan, if you're (or rather whoever is maintaining this part of the site is) willing to change the files shipped with silverlight comment 15 describes the modification you want to make.  If you're not, then you need to get Microsoft to change it on their end...
Comment 25 Brian Polidoro 2008-06-09 13:52:08 PDT
I got a chance to look at the Silverlight 2 beta 2 SDK and the isinstalled function has been rewritten and uses the plugins array and the plugin description as suggested by jst. 

So can this be marked invalid or wontfix then?

Comment 26 Mike Shaver (:shaver) 2008-06-09 13:54:16 PDT
WONTFIX, yeah.
Comment 27 Denton V. 2008-06-14 13:30:03 PDT
I still experience this issue. 
I have the latest beta of Silverlight 2 installed and although Brian says the function has been rewritten, Firefox 3 rc3 is still not recognizing the Silverlight plug-in when I visit Microsoft's website: http://www.microsoft.com
Comment 28 Brian Polidoro 2008-06-14 17:25:42 PDT
Microsoft.com is still using a previous version of silverlight.js.  They may not deploy the new version until Silverlight 2 is released.
Comment 29 Alexander Yuan 2008-06-17 07:28:59 PDT
Denton - this is probably best understood as a problem with the website's javascript, not with the silverlight plugin itself.  So it's not a problem on your end.


FYI for everyone - For those who need the new silverlight.js, you're supposed to either get the file as part of the 2.0 SDK, or use this: http://agappdom.net/i/silverlight.js

(This is according to http://blogs.msdn.com/nigel/archive/2008/06/17/why-is-silverlight-1-broken-with-firefox-3-and-how-do-i-fix-it.aspx )
Comment 30 Nigel Parker 2008-06-17 15:18:45 PDT
Sorry all I lead you wrong.

Silverlight Streaming is still serving up the Silverlight 2 Beta 1 detection script at http://agappdom.net/i/silverlight.js, I expect this will be updated later this week when Silverlight Streaming starts supporting Silverlight 2 Beta 2.

In the mean time I have uploaded just the new Silverlight 2 Beta 2 Silverlight.js detection file to http://cid-f4ba2b022841cc3a.skydrive.live.com/self.aspx/Public/Silverlight.js
Comment 31 Jace Milam 2008-06-17 22:43:21 PDT
I know next to nothing about scripts and codes and .js files. So I am hoping you guys can help. I am a huge Texas Rangers fan but I live in CA I would like to be able to watch the game fullscreen. This silverlight problem is killing me. Can you help me? Has this been resolved it? I need a simple step by step solution as I am not very computer literate. I have the latest beta of Silverlight 2 installed. Thanks in advance for your help.
Comment 32 Brian Polidoro 2008-06-18 08:42:04 PDT
*** Bug 439883 has been marked as a duplicate of this bug. ***
Comment 33 Matt 2008-06-23 12:15:00 PDT
Has anyone had any luck with this? I would really like to be able to use this website properly. I don't understand why this worked fine in Firefox 2.0.0.14 and this won't work in Firefox 3. 
Comment 34 Raymie Humbert 2008-06-23 12:15:56 PDT
Mozilla changed the way <object> elements are loaded.
Comment 35 Boris Zbarsky (:bz) 2008-06-24 20:25:54 PDT
And more precisely, the site depended on a bug in Firefox 2.  Then the bug got fixed.
Comment 36 Matt 2008-07-01 17:53:51 PDT
Has there been any success at fixing this? 
Comment 37 Denton V. 2008-07-02 12:25:52 PDT
Like has been said above, when the sites using Silverlight 1.0 upgrade to 2.0, you will not have any issues. 
Comment 38 Matt 2008-07-29 09:41:33 PDT
I still can't get Silverlight to work with Firefox 3. Does anyone know how to fix this? 
Comment 39 Denton V. 2008-08-02 09:14:07 PDT
Silverlight *works* with Firefox 3. The problem may be that the site you are viewing is using Silverlight 1.0. Sites using a later version (2.0 and above) do not have this problem. (See above comments for details.  
Microsoft's own site (http://www.microsoft.com) also had an issue with this but now it is fixed. Contact the site administrator of the site you are trying to view and ask about their upgrade plans.
Comment 40 Henrik Skupin (:whimboo) 2008-08-02 15:59:17 PDT
(In reply to comment #25)
> I got a chance to look at the Silverlight 2 beta 2 SDK and the isinstalled
> function has been rewritten and uses the plugins array and the plugin
> description as suggested by jst. 
> 
> So can this be marked invalid or wontfix then?

Reading this comment gives me the feeling that it should be better marked as invalid as wontfix. The cause is not on our side. Shaver? 

Comment 41 Jonas Sicking (:sicking) 2008-08-04 01:35:55 PDT
Actually, it should be a tech evangelism bug.
Comment 42 Matt 2008-08-04 03:17:18 PDT
(In reply to comment #41)
> Actually, it should be a tech evangelism bug.
> 

What does "tech evangelism bug" mean? I'm not familiar with that term. 
Comment 43 Jonas Sicking (:sicking) 2008-08-04 03:46:11 PDT
It means that the action we're taking is trying to contact the site and ask them to fix their pages. I.e. we are not planning on changing our code.
Comment 44 Brian Polidoro 2009-04-08 06:46:13 PDT
I heard MLB dropped Silverlight.  The URL given uses flash now.  
-> WFM

Note You need to log in before you can comment on or make changes to this bug.