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

NS_ERROR_XPC_BAD_OP_ON_WN_PROTO error when loaded into Firefox OS simulator #29

Closed
townxelliot opened this issue Sep 20, 2013 · 3 comments

Comments

@townxelliot
Copy link

Environment:

  • Firefox (21.0 and 22.0 and 25.0) + Firefox OS Simulator 4.0
    and
    Firefox 25.0 + Firefox OS Simulator 5.0pre4
  • Fedora Linux 17 64bit

I get this error:

NS_ERROR_XPC_BAD_OP_ON_WN_PROTO: Illegal operation on WrappedNative prototype object

if I try to include the x-tags library in a project and load it into the Firefox OS simulator. x-tags works fine if I push it to the device itself. (So I'm not sure if I should be raising a bug for the simulator too/instead.)

To reproduce:

  • Make an HTML file with a script tag which pulls in x-tag-core (I'm using a version checked out with bower, 0.8.1):
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="x-tag-core/dist/x-tag-core.js"></script>
</head>
<body>
</body>
</html>
  • Make a manifest.webapp file for it in the same directory:
{
  "name": "x-tags",
  "type": "privileged",
  "description": "testing x-tags",
  "launch_path": "/index.html",
  "icons": {},
  "developer": {
    "name": "foo",
    "url": "http://foo/"
  },
  "default_locale": "en",
  "permissions": {}
}
  • Load the project's manifest in the simulator, with "Connect" enabled so you can see the error messages.

The error is being raised by line 2902 of the built file, which corresponds with https://github.com/x-tag/core/blob/master/src/core.js#L856.

If I comment this line out, x-tags loads fine and works as expected.

Also, it looks as though L856 does approximately the same thing as the line before (though I imagine there are differences and it's probably important that a property is defined, as well as set explicitly).

@s-clerc
Copy link

s-clerc commented Nov 17, 2013

I have not been able to reproduce this problem on Aurora 27.0a2 (2013-11-16).
I have also tested this on firefox 25.01.
Both tests were conducted using the simulator 4, running on OS X Mavericks.
This leads me to believe that there may be a problem with simulator 5

@csuwildcat
Copy link
Member

This should have been resolved by this commit: 7f06da1#diff-7eb52b366866677666470e019283c8ea

@ebuildy
Copy link

ebuildy commented Apr 16, 2014

I still get the error from http://m.qwant.com/?q=github , from FirefoxOS mobile ZTE.

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

4 participants