X-notifier broken on Firefox 47 due to change in nsICookieManager2.remove

Bug 1245184 altered nsICookieManager2.remove.

Now X-notifier is broken on Firefox 47. I get this error:

[Exception... "Not enough arguments [nsICookieManager2.remove]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: jar:file:///%myFirefoxProfile%/extensions/%7B37fa1426-b82d-11db-8314-0800200c9a66%7D.xpi!/components/Main.js -> resource://xnotifier/cookieManager2.js :: CookieManager.prototype.clear :: line 161" data: no]

Edit: Previously I said Firefox 37. I meant Firefox 47, of course.

It seems easy to fix. In cookieManager2.js line 161, use

obj.remove(ck.host,ck.name,ck.path,ck.originAttributes,false);

instead of

obj.remove(ck.host,ck.name,ck.path,false);

Is there any way to change the subject line of this thread? I skipped over it when trying to see why X-Notifier had stopped working recently for me, because of the typo in the subject line/first post. The linked bug landed in Firefox 47, not 37, which is currently on Aurora/Developer Edition.

That said, since I'm on Developer Edition ironically because I do have extensions that were modified by hand ages ago that won't work come Firefox 46, Loiro, I just wanted to double check something. If I just unzip the X-Notifier .xpi and make your suggested change and then rezip it up and install the modified .xpi, it should work? It's been ages since I've done that, so I just wanted to make sure. Hopefully, tobwithu notices this and catches it before 47 hits beta, where a manual fix won't help users. (Side note: for anyone who uses extensions that deal with cookies, you might want to check with the extension devs to see if they know about this change yet. According to the bug, the change will be in the release notes for 47, because it will break a bunch of extensions. Some known ones are listed in the bug.)

Thanks for noticing the typo.

And yes, these steps worked for me:

  1. Go to about:support, search Profile Folder and click Show Folder button.
  2. Unzip extensions/{37fa1426-b82d-11db-8314-0800200c9a66}.xpi/components/cookieManager2.js
  3. Open the extracted file, and replace obj.remove(ck.host,ck.name,ck.path,false); with obj.remove(ck.host,ck.name,ck.path,ck.originAttributes,false);
  4. Add cookieManager2.js back into the .xpi file

Then Firefox will detect the add-on has been modified and will disable it. To prevent that,

  1. Go to about:config
  2. Set xpinstall.signatures.required = false
jeroen's picture

I needed that signature info a long time ago.

Lorio, the change works beautifully. I went ahead and downloaded the official .xpi and modified that the same way for myself, since I run both a desktop and a portable copy of 47.0a2, but it just really has been a while since I did that. Thanks for the troubleshooting, and I'll keep an eye on the change you noticed is coming that they backed out of 48 Nightly for now as well.

Jeroen, just bear in mind that the xpinstall.signatures.required pref will only work in Nightly and Aurora/Developer edition come 46 (or in unbranded Beta/Release builds, whenever those appear), unless Mozilla pushed that back again.

jeroen's picture

Ah, thanx...