If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Flash->JS - ExternalInterface Calls can't find JS sometimes (Since 15.0b4)




JavaScript Engine
5 years ago
2 years ago


(Reporter: sacher, Unassigned)


16 Branch

Firefox Tracking Flags

(Not tracked)



(1 attachment)



5 years ago

we are developing an e-learning creation suite.
Our created courses use HTML, Javascript and multiple Flash-Objects to show the content.

Since the release of FireFox 15 we are having MASSIVE problems with the ExternalInterface Calls, that our flash-movies use to communicate between each other (and with Javascript itself).


The Bug:
On Initialisation, each flash-movie calls some of our javascript-functions to get required parameters from JS (like getLanguage()...).

That ExternalInterface calls just fail sometimes. The function won't start. If I debug the JS, the function just don't get called. But the Flash object calls it for sure! The call just gets lost sometimes.

FireBug and the JavaConsole are throwing an exception "TypeError: non-native scope object" for each ExternalInterface call, that is made by Flash to JS.

The error appears randomly. So one time, the call is giving an result. Sometimes not (same configuration, same session, etc).

That doesn't only happen, when I call our own JS-functions, but also if I use browser-functions like alert() or console.log().

For me, it seems like the flash-object can't find any JS-Api to "speak" with.


The error is hard to explain and not easy to reproduce. I have tried, to create a small html-page, which has the same error, but failed with that.

But I did some testing in a virtual machine with WinXP running.
I tried every Beta-Version of FF15 and I can say, that everything runs fine with versions smaller then 15.0b4.
If you use a version > 15.0b4 that error is present (even in FF16 and newer beta-versions of 17)...
It doesnt matter if you use WindowsXP, Win7 or even a Mac.
I hadn't installed any addons. So the error isn't there... 


Files for testing:
To explain everything better and that everyone can see the error "live" I created an e-learning course with our software, that describes the error more and where you can see the error live.

Just open:  http://goo.gl/vQRcV   (allow popups!)
There I have written some more Informations and ways to reproduce the error.

Short Test: http://goo.gl/bKZGt
(just many flash-objects. ~3 of 12 aren't displayed (randomly) and are throwing the error).

(If the navigation-bar on top doesn't work, reload the page. Thats a bug, we are still working on but has nothing to do with this FF-Bug ;) )


ExternalInterface Calls from Flash randomly don't find the Javascript-Api of the browser. 
Exception: "non-native scope object" is thrown.
Doesn't matter if external or browser-intern JS-Function is called. alert() doesn't work too. Same error.

Problem exists since FireFox 15.0b4. And is present in every version since then.

More information in the test-course: http://goo.gl/vQRcV

End Note:
We are creating courses for a few years now. We never had a problem like this.
In no other browser this problem appears. IE6,7,8,9 works. Chrome too. Safari too.
Every Firefox Version below 15.0b4 works too.
Even if we open courses, that we have created YEARS ago, and that have worked without a problem since then, show this error now.

It would be great, if someone could review the changes from FF 15.0b4. It seems, like there's something not quiet right with the JS-Api.

If you need any more information just ask.
I will help where I can!

Bye and thanks in advance!


5 years ago
Component: General → JavaScript Engine
OS: Windows 7 → All
Product: Firefox → Core
Created attachment 676993 [details]
Stacktrace for the "non-native scope" exception

Looks like we end up calling into plugin land from a GetPropertyOperation and then end up calling into JS again with a "Proxy" as the scopeChainArg.

Comment 2

5 years ago

is there anything I can do about this, or is this a malfunction of FF and I'm right about that this looks like a FF-Bug?

Thanks for your answer, but I have to ask, because  I don't understand anything of the stuff you wrote ^^
Ever confirmed: true
Further debugging reveals that we seem to be hitting this assert
JS_ASSERT_IF(options.principals, cx->compartment->principals == options.principals); in JS::Evaluate.

It looks like the code does something like this?
window.parent.embedded_object['get_property'] and the NPAPI calls back into JS code using the wrong prototype.

For the moment you might be able to not hit this problem by doing something like:

Search for "initializePage" in your js code. It might be this one:
try{ var initObject = obj.initializePage(pageId);} catch(e) { }

Comment 4

5 years ago
We just hit this bug as well. Roughly half of the time we load our product the ExternalInterface call fails (return null). It only occurs in FF15b5 and later. 

This bug is indeed a major one (yes, people still use Flash out there).

Comment 5

5 years ago
It's hard to find a regression range because even if with the Flash page displaying 12 images (http://goo.gl/bKZGt), every time the 12 images are displayed normally.

Is someone able to provide a reduced testcase?
Keywords: regressionwindow-wanted, testcase-wanted

Comment 6

5 years ago

I tried to build a reduced page. But I failed. It seems to be connected with the double embedded JS-File. One in the main page, one in the frame/iframe.

So the page needs to be complex, that the error occurs.

But I tested it on several different machines. The error occured in different strenght on each machine.
On some PC's it's only 0-2 of the 12 that isn't displaying regulary, on other PCs it's nearly 2-4 of 12 that is not displayed.
If your PC can handle it well, then maybe you could try it in an VirtualMachine?
I have an VirtualBox Image of WinXP with FF16 installed. There I get the error all the time, too. :/

But it's really strange that you don't see the error at all... The Test-Course has 2 pages with the same content. Have you changed paged back and forth in the navigation on top?
If you do that quickly. You SHOULD see the error...

Comment 7

5 years ago
I have tested FF17 today.
The error is still there :(

Comment 8

5 years ago
We really need a better minimal testcase. :|

In my case on Win 7, with FF20, the issue is not reproducible every time.
Screenshot: http://i.imgur.com/KfbKx.jpg

Comment 9

4 years ago

I just wanted to say that the problem hasn't appeared since FireFox 20.
I think, this ticket can be closed then.

THX and bye!
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
Keywords: regressionwindow-wanted, testcase-wanted
You need to log in before you can comment on or make changes to this bug.