hultmann / multifox

Multifox is an extension that allows Firefox to connect to websites using different user names.
http://br.mozdev.org/multifox/
136 stars 35 forks source link

Compatibility with Webmail Notifier #21

Open tbs opened 13 years ago

tbs commented 13 years ago

Hi hultmann, can you check if you can make MultiFox 2 compatible with Webmail Notifier addon: http://webmailnotifier.mozdev.org/installation.html

Actually it always open previous logged account if you try to access another account in same service, example two Gmail.

Thanks

hultmann commented 13 years ago

I'll have to investigate how Webmail Notifier works, I'm not sure if it is fixable.

digideth commented 11 years ago

Well they have changed names now... X-Notifier http://xnotifier.tobwithu.com/wp/

Your Multifox 2.0b6 and X-Notifier 3.0.3 still do not work together...

Any chance on getting them to work together?

Drugoy commented 11 years ago

I have the very same request about Gmail Notifier (restartless). This is restartless add-on, so I hope you could take a look at this first.

hultmann commented 11 years ago

X-Notifier seems to work (Multifox 2.0b7pre). However, clicking on the x-notifier button may not open the desired account.

Gmail Notifier won't work because it seems to just use the account already logged in. I don't see a fix here.

digideth commented 11 years ago

OK thanks for the update.

hultmann commented 11 years ago

Actually it always open previous logged account if you try to access another account in same service, example two Gmail.

Does it still apply to current versions of X-Notifier?

hultmann commented 11 years ago

Actually X-Notifier works in a similar way as Multifox works. Conflicts are inevitable. You cannot use both extensions.

digideth commented 11 years ago

I figured that would be the outcome...

Thank you @hultmann for taking the time to look to see if there was any way for the 2 Add-ons to get along.

Drugoy commented 11 years ago

@hultmann

Gmail Notifier won't work because it seems to just use the account already logged in. I don't see a fix here.

As far as I understand - Multifox just swaps cookies for the selected tab. But if there is no tabs - then the last closed tab's cookies get used as the "default" ones (by default I mean - the ones that get used if you then open a new tab with that site), right?

The main problem is not that Gmail Notifier can't track multiple accounts if the user logged them all in using Multifox. The main problem is that Gmail Notifier doesn't see any data on the https://mail.google.com/mail/feed/atom page, although I do see the data there if I open that address manually. My only suspension is that cookies' URLs are somehow affecting this issue, but the author of that extension said: @inbasic

ignotifier uses the standard feed to check for updates, https://github.com/inbasic/ignotifier/blob/master/src/package.json#L29 What would be the feed format in this case? Note that the extension doesn't check the cookies.

Here's the code that Gmail Notifier uses to check those XMLs:

var req = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] 
    .createInstance(Components.interfaces.nsIXMLHttpRequest);
req.mozBackgroundRequest = true; //No authentication 
req.open('GET', "https://mail.google.com/mail/u/0/feed/atom", false);
req.channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal)
    .forceAllowThirdPartyCookie = true;
req.send(null);
console.log(req.responseText)

And here's some more data, that you might find interesting:

  1. The issue doesn't come up if I am already logged-in to Gmail before I turn on MultiFox. At that moment, Gmail's cookies the cookies have normal "mail.google.com" URLs.
  2. But the issue comes up if I then log off and log-in again: Multifox recognizes a new account I just used and at that moment there are no cookies with normal URLs, instead there appear cookies with "mail.google.com.heregolotsofrandomsymbols.multifox-auth-2" URLs.
  3. If I open an URL like https://mail.google.com/mail/feed/atom or https://mail.google.com/mail/u/0/feed/atom - both open well and I see raw XML data there. But if I then open another URL in those tabs and then hit "back" - the first one shows me a page with Firefox built-in RSS reader, but the second one shows me the above "Unauthorized: Error 401" error, but if I hit F5 (reload page) - it gets loaded well.

What do you think? Why might this bug then happen? May it be, that Gmail Notifier calls some Firefox API that doesn't play well if MultiFox is installed?

zmasterar commented 11 years ago

I was having some issues with gmail notifier and Multifox 2.0b8, but i thought it was only me, cause i use google apps instead of just plain gmail. A while earlier i discoverd that i'm just having troubles when i clic the gmail notifier button, but if i clic on a bookmark, i don't get any errors.

I'm just giving some feedback, don't know if it's fixable in the multifox side.