Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error calling method on NPObject!" #243

Closed
peterbe opened this issue Jun 9, 2011 · 0 comments
Closed

"Error calling method on NPObject!" #243

peterbe opened this issue Jun 9, 2011 · 0 comments

Comments

@peterbe
Copy link

peterbe commented Jun 9, 2011

I sometimes get this error when using Flashsocket in Firefox. It's quite strange (stinks of Flash "brittleness") because I think a restart of the browser will fix the problem.

Error calling method on NPObject!
[Break On This Error] WebSocket.__flash.setCallerUrl(location.href); 

The line where is happens is this:

  /**
   * Called by Flash to notify JS that it's fully loaded and ready
   * for communication.
   */
  WebSocket.__onFlashInitialized = function() {
    // We need to set a timeout here to avoid round-trip calls
    // to flash during the initialization process.
    setTimeout(function() {
      WebSocket.__flash = document.getElementById("webSocketFlash");
      WebSocket.__flash.setCallerUrl(location.href);
      WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);
      for (var i = 0; i < WebSocket.__tasks.length; ++i) {
        WebSocket.__tasks[i]();
      }
      WebSocket.__tasks = [];
    }, 0);
  };

I guess it means that document.getElementById("webSocketFlash") returns null. But why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants