mitro-co / mitro

Repository for all Mitro client & server code
GNU General Public License v3.0
1.65k stars 242 forks source link

Console error in Firefox addon #4

Open diracdeltas opened 10 years ago

diracdeltas commented 10 years ago

Upon installing the addon for the first time and clicking on the toolbar icon, I got this console error:

console.error: mitro-login-manager: 
  Message: TypeError: document.getElementById(...) is null
  Stack:
    updateLoginState/</</</<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/yan/.mozilla/firefox/PROFILE/extensions/jid1-MnnxcxisBPnSXQ@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://mitro-login-manager-at-jetpack/mitro-login-manager/data/js/popup.js:4:307
Client.prototype.setMethod/this[a]</<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/yan/.mozilla/firefox/PROFILE/extensions/jid1-MnnxcxisBPnSXQ@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://mitro-login-manager-at-jetpack/mitro-login-manager/data/js/client.js:13:299
Client/this.processIncoming@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/yan/.mozilla/firefox/PROFILE/extensions/jid1-MnnxcxisBPnSXQ@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://mitro-login-manager-at-jetpack/mitro-login-manager/data/js/client.js:2:226
ExtensionHelper/this.bindClient/<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/yan/.mozilla/firefox/PROFILE/extensions/jid1-MnnxcxisBPnSXQ@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://mitro-login-manager-at-jetpack/mitro-login-manager/data/js/helpers.js:7:411
onEvent@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/yan/.mozilla/firefox/PROFILE/extensions/jid1-MnnxcxisBPnSXQ@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://gre/modules/commonjs/sdk/content/content-worker.js:45:9
onChromeEvent@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/yan/.mozilla/firefox/PROFILE/extensions/jid1-MnnxcxisBPnSXQ@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://gre/modules/commonjs/sdk/content/content-worker.js:96:9
diracdeltas commented 10 years ago

Side note: The Mitro onboarding process is really smooth and gorgeous. Would love to have something similar for HTTPS Everywhere and Privacy Badger upon install.

evanj commented 10 years ago

What version of Firefox is this? Login fails on 32 and 33 (Issue #2), but this stack trace is a bit different.

And thanks for the comments about the on boarding. If there is some easy way we could repurpose any of that stuff for the EFF extensions, we are happy to help.

diracdeltas commented 10 years ago

Tracking this down now. Firefox 31

jerbob92 commented 10 years ago

I have this on FF31 too. When I visit the plugin on "resource://mitro-login-manager-at-jetpack/mitro-login-manager/data/html/secrets.html", it works fine.

Just the popup seems to be having issues. I tracked it down to:

document.getElementById("no-account-banner").classList.remove("hide")

In popup.js

jerbob92 commented 10 years ago

After commenting out that code it's still not working properly. The actual error seems to be in "can't access dead object". Which is caused when an addon tries to reference an GC'ed object (when the document is destroyed for example).

I tried some stuff like upgrading the jetpack SDK, but without any luck.

evanj commented 10 years ago

Yeah, this is unfortunately a critical issue, and I'm not sure what the issue is. We are looking into hiring a contractor to help out with Mitro, so hopefully we can get this fixed in the near future. If you know someone who might be appropriate, please let us know!