google-code-export / swfobject

Automatically exported from code.google.com/p/swfobject
1 stars 1 forks source link

Error: uncaught exception: [Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)" #408

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
在 Firefox 浏览器上浏览时出错,IE、Chrome 不会;

出错的提示代码如下:
Error: uncaught exception: [Exception... "Node was not found"  code: "8"
nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)"  location:
"http://192.168.1.7/by-misasa/swfobject.js Line: 4"]

源文件代码(部分):

    function testPlayerVersion() {
        var b = doc.getElementsByTagName("body")[0];
        var o = createElement(OBJECT);
        o.setAttribute("type", FLASH_MIME_TYPE);
        var t = b.appendChild(o);
        if (t) {
            var counter = 0;
            (function(){
                if (typeof t.GetVariable != UNDEF) {
                    var d = t.GetVariable("$version");
                    if (d) {
                        d = d.split(" ")[1].split(",");
                        ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
                    }
                }
                else if (counter < 10) {
                    counter++;
                    setTimeout(arguments.callee, 10);
                    return;
                }
                b.removeChild(o);    // 出错的行,改成这样就可以
了:o.parentNode.removeChild(o);
                t = null;
                matchVersions();
            })();
        }
        else {
            matchVersions();
        }
    }

操作系统: Windows Server 2003
浏览器: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2

Original issue reported on code.google.com by f.v.yue...@gmail.com on 27 Nov 2009 at 10:14

GoogleCodeExporter commented 9 years ago
A co-worker today encountered the exact same problem. She has FF 3.0.1 and
Flash-Player 10.0 (r22). Javascript throws the error stated above. The 
alternative
content gets replaced by nothing.

Original comment by cwilma...@googlemail.com on 27 Nov 2009 at 2:27

GoogleCodeExporter commented 9 years ago
It seems swfobject might be firing before the DOM content is properly loaded. I 
was
able to get things working by using setTimeout for the embedSWF 
call...obviously not
a very good solution. If anyone has any ideas, that would be much appreciated.

Original comment by victorio...@gmail.com on 10 Dec 2009 at 3:19

GoogleCodeExporter commented 9 years ago
Actually, it seems temperamental at best. The timeout works for some things, 
but not
for others.

Original comment by victorio...@gmail.com on 10 Dec 2009 at 3:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This may be related to http://code.google.com/p/swfobject/issues/detail?id=327

Original comment by victorio...@gmail.com on 10 Dec 2009 at 4:23

GoogleCodeExporter commented 9 years ago
Are you still encountering this issue? If not, I will close this thread.

Original comment by platelu...@gmail.com on 7 Nov 2010 at 8:50

GoogleCodeExporter commented 9 years ago
I'm closing this thread due to inactivity. If you feel the issue still needs to 
be addressed, please post a reply. Be sure to include more detailed 
information, such as browser, OS, and Flash Player version. Thanks

Original comment by platelu...@gmail.com on 8 Nov 2010 at 6:05

GoogleCodeExporter commented 9 years ago
Issue 510 has been merged into this issue.

Original comment by platelu...@gmail.com on 14 May 2011 at 7:54

GoogleCodeExporter commented 9 years ago
Just a couple of notes for future reference: 

1. Some people have mentioned this error occurs because of conflicts with 
Firefox add-ons. If you're encountering the NS_ERROR_DOM_NOT_FOUND_ERR error, 
try disabling your add-ons to see if it helps. 

2. Some people report that invoking swfobject.switchOffAutoHideShow() before 
using swfobject.embedSWF() fixes the issue.

Original comment by platelu...@gmail.com on 14 May 2011 at 8:02

GoogleCodeExporter commented 9 years ago
You may want to see http://code.google.com/p/swfobject/issues/detail?id=332

Original comment by platelu...@gmail.com on 14 May 2011 at 8:30