vanowm / FirefoxCookiesManagerPlus

Cookies Manager+ for Firefox
https://addons.mozilla.org/firefox/addon/cookies-manager-plus/
GNU General Public License v3.0
28 stars 11 forks source link

Cookie manager not working in Tor browser #79

Open juhiyu opened 8 years ago

juhiyu commented 8 years ago

Hellos, i use tor browser for long time and used cookies manager plus but important features like adding cookies doesnt work for me.

Can anyone test this and see if they also cannot add cookies?

vanowm commented 8 years ago

Mm...CM+ doesn't work with Tor at all, not just add cookies.

juhiyu commented 8 years ago

Thx for fixing it quick...i will test it when it is out

vanowm commented 8 years ago

It's might be a while. I'll wait for more changes in the code before submit it to AMO. The only change relevant to this issue was in chrome/modules/coomanPlusCore.jsm

juhiyu commented 8 years ago

ok no problem, no hurry

juhiyu commented 8 years ago

Hellos, just tested it still does not work for me when trying to add cookies

vanowm commented 8 years ago

Works fine for me.

Although the creation date is incorrect, but that's browser's issue.

juhiyu commented 8 years ago

Are you using the latest version of Tor browser (6.0.1)? I'm on Debian x64

For me CM+ 1.11.2 doesn't show any cookies for any site. When I click search: github.com on CM while logged in there are no cookies at all (showing 0 of 0) and adding a cookie manually also doesn't show up in headers either.

vanowm commented 8 years ago

Yes, I'm testing it on latest version on Win 10 x64

Enable debug loggin by changing extensions.cookiesmanagerplus.debug to 7 in about:config and look in browser console (CTRL+SHIFT+J)

You might need restart browser, if the problem is still in coomanPlusCore.jsm

juhiyu commented 8 years ago

CM+ (coomanPlusCore.jsm:243:1): (debug):observe([xpconnect wrapped nsISupports], "private-cookie-changed", "changed") execTime: 69300 CM+ (coomanPlusCore.jsm:243:1): (debug):observe([xpconnect wrapped nsISupports], "private-cookie-changed", "changed") execTime: 70200 CM+ (libOut.js:1:1): (debug):[libOut.js loaded] N/A execTime: 76800 CM+ (commonFunc.js:402:1): (debug):[startfalse] protect_init(false) execTime: 76800 CM+ (commonFunc.js:513:1): (debug):[startfalse] protect_CookieKeeper_init(undefined) execTime: 76800 CM+ (cookiesmanagerplus.js:301:1): (debug):[start] start() execTime: 0 CM+ (cookiesmanagerplus.js:3216:1): (debug):focus([xpconnect wrapped nsISupports]) execTime: 0 CM+ (cookiesmanagerplus.js:532:1): (debug):onPrefChange_do() execTime: 0 CM+ (cookiesmanagerplus.js:1808:1): (debug):setFilter(undefined, undefined, undefined) execTime: 0 CM+ (cookiesmanagerplus.js:2059:1): (debug):setSort(undefined, undefined, undefined) execTime: 0 CM+ (cookiesmanagerplus.js:3397:1): (debug):command("topmost") execTime: 0 CM+ (cookiesmanagerplus.js:2135:1): (debug):infoRowsShow() execTime: 0 CM+ (cookiesmanagerplus.js:2432:1): (debug):setDecode() execTime: 0 CM+ (cookiesmanagerplus.js:2443:1): (debug):setBase64Decode() execTime: 0 CM+ (cookiesmanagerplus.js:2208:1): (debug):infoRowsSort() execTime: 0 CM+ (cookiesmanagerplus.js:1408:1): (debug):doLookup() execTime: 0 CM+ (cookiesmanagerplus.js:1808:1): (debug):setFilter() execTime: 0 CM+ (cookiesmanagerplus.js:595:1): (debug):loadCookies(undefined, true) execTime: 0 CM+ (cookiesmanagerplus.js:604:1): (debug):[deleteExpired: false] loadCookies("", true) execTime: 0 CM+ (treeUtils.js:42:1): (debug):[sort begin] sortTreeData([object XULElement], ) execTime: 0 CM+ (treeUtils.js:111:1): (debug):[sort end] sortTreeData([object XULElement], ) execTime: 0 [0] CM+ (cookiesmanagerplus.js:1311:1): (debug):selectLastCookie(true) execTime: 0 CM+ (cookiesmanagerplus.js:438:1): (debug):cookieSelectedEvent([object Event]) execTime: 0 CM+ (cookiesmanagerplus.js:1453:1): (debug):[,false] cookieSelected() execTime: 0 CM+ (cookiesmanagerplus.js:1050:1): (debug):clearCookieProperties(0) execTime: 0 CM+ (cookiesmanagerplus.js:1529:1): (debug):UI_EnableCookieBtns(false, false) execTime: 0 CM+ (cookiesmanagerplus.js:438:1): (debug):cookieSelectedEvent([object Event]) execTime: 0 CM+ (cookiesmanagerplus.js:1453:1): (debug):[,false] cookieSelected() execTime: 0 CM+ (cookiesmanagerplus.js:1050:1): (debug):clearCookieProperties(0) execTime: 0 CM+ (cookiesmanagerplus.js:1529:1): (debug):UI_EnableCookieBtns(false, false) execTime: 0 CM+ (cookiesmanagerplus.js:1453:1): (debug):[true,false] cookieSelected(true) execTime: 0 CM+ (cookiesmanagerplus.js:1050:1): (debug):clearCookieProperties(0) execTime: 0 CM+ (cookiesmanagerplus.js:1529:1): (debug):UI_EnableCookieBtns(false, false) execTime: 0 CM+ (cookiesmanagerplus.js:1311:1): (debug):selectLastCookie(true) execTime: 0 CM+ (cookiesmanagerplus.js:438:1): (debug):cookieSelectedEvent([object Event]) execTime: 0 CM+ (cookiesmanagerplus.js:1453:1): (debug):[,false] cookieSelected() execTime: 0 CM+ (cookiesmanagerplus.js:1050:1): (debug):clearCookieProperties(0) execTime: 0 CM+ (cookiesmanagerplus.js:1529:1): (debug):UI_EnableCookieBtns(false, false) execTime: 0 CM+ (cookiesmanagerplus.js:438:1): (debug):cookieSelectedEvent([object Event]) execTime: 0 CM+ (cookiesmanagerplus.js:1453:1): (debug):[,false] cookieSelected() execTime: 0 CM+ (cookiesmanagerplus.js:1050:1): (debug):clearCookieProperties(0) execTime: 0 CM+ (cookiesmanagerplus.js:1529:1): (debug):UI_EnableCookieBtns(false, false) execTime: 0 CM+ (cookiesmanagerplus.js:1453:1): (debug):[true,false] cookieSelected(true) execTime: 0 CM+ (cookiesmanagerplus.js:1050:1): (debug):clearCookieProperties(0) execTime: 0 CM+ (cookiesmanagerplus.js:1529:1): (debug):UI_EnableCookieBtns(false, false) execTime: 0 CM+ (commonFunc.js:1026:1): (debug):checkReset("main") execTime: 0 CM+ (commonFunc.js:1042:1): (debug):checkRestore("main") execTime: 0 CM+ (cookiesmanagerplus.js:413:1): (debug):[end] start() execTime: 0 [0] TypeError: NetworkError when attempting to fetch resource. getFirstPartyURI failed for chrome://cookiesmanagerplus/content/cookiesmanagerplus.xul: 0x80070057 CM+ (options.js:551:1): (debug):[standalone false] N/A execTime: 3600 CM+ (options.js:513:1): (debug):topmost() execTime: 3600 CM+ (libOut.js:1:1): (debug):[libOut.js loaded] N/A execTime: 3600 CM+ (commonFunc.js:402:1): (debug):[startfalse] protect_init(false) execTime: 3600 CM+ (commonFunc.js:513:1): (debug):[startfalse] protect_CookieKeeper_init(undefined) execTime: 3600 CM+ (options.js:54:1): (debug):init() execTime: 3700 CM+ (commonFunc.js:402:1): (debug):[starttrue] protect_init() execTime: 3700 CM+ (commonFunc.js:1026:1): (debug):checkReset("optionsBox") execTime: 3700 getFirstPartyURI failed for chrome://cookiesmanagerplus/content/options.xul: 0x80070057 CM+ (commonFunc.js:569:1): (debug):protect_CookieKeeper_unload() execTime: 9000 CM+ (commonFunc.js:573:1): (debug):[protect observer removed] protect_CookieKeeper_unload() execTime: 9000 CM+ (string): [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://cookiesmanagerplus/content/commonFunc.js :: protect_CookieKeeper_unload :: line 574" data: no] protect_CookieKeeper_unload@chrome://cookiesmanagerplus/content/commonFunc.js:574:5 protect_unload@chrome://cookiesmanagerplus/content/commonFunc.js:422:4 unload@chrome://cookiesmanagerplus/content/options.js:186:5 onunload@chrome://cookiesmanagerplus/content/options.xul:1:1

CM+ (cookiesmanagerplus.js:1212:1): (debug):onKeyDown([object KeyboardEvent]) execTime: 9500 From changing debug level to 7 and reloading the Github page
juhiyu commented 8 years ago

After changing to level 7, closing and reopening browser:

CM+ (coomanPlusCore.jsm:434:1): (debug):readonlyLoad() execTime: 0 CM+ (coomanPlusCore.jsm:586:1): (debug):[coomanPlusCore.jsm loaded] N/A execTime: 0 CM+ (sysOverlay.js:41:1): (debug):[start load sysoverlay] init() execTime: 1800 CM+ (sysOverlay.js:74:1): (debug):[end load sysoverlay] init() execTime: 0 [1800]

juhiyu commented 8 years ago

Trying to add a test cookie

CM+ (cookiesmanagerplus.js:3216:1): (debug):focus([object Object], true) execTime: 240600 CM+ (cookiesmanagerplus.js:2067:1): (debug):openAdd() execTime: 243500 CM+ (commonFunc.js:845:1): (debug):openEdit([object Object]) execTime: 243500 CM+ (libOut.js:1:1): (debug):[libOut.js loaded] N/A execTime: 243500 CM+ (commonFunc.js:402:1): (debug):[startfalse] protect_init(false) execTime: 243500 CM+ (commonFunc.js:513:1): (debug):[startfalse] protect_CookieKeeper_init(undefined) execTime: 243500 getFirstPartyURI failed for chrome://cookiesmanagerplus/content/editCookie.xul: 0x80070057 CM+ (editCookie.js:940:1): (debug):command("topmost") execTime: 243600 getFirstPartyURI failed for chrome://cookiesmanagerplus/content/editCookie.xul: 0x80070057 CM+ (commonFunc.js:1026:1): (debug):checkReset("edit") execTime: 243600 CM+ (commonFunc.js:1042:1): (debug):checkRestore("edit") execTime: 243600 CM+ (coomanPlusCore.jsm:322:1): (debug):readonlyAdd([object Object]) execTime: 251700 CM+ (coomanPlusCore.jsm:375:1): (debug):readonlySave() execTime: 251700 CM+ (cookiesmanagerplus.js:1125:1): (debug):observe([xpconnect wrapped nsISupports], "cookie-changed", "added") execTime: 251700 CM+ (coomanPlusCore.jsm:243:1): (debug):observe([xpconnect wrapped nsISupports], "cookie-changed", "added") execTime: 251700 CM+ (cookiesmanagerplus.js:1125:1): (debug):observe([xpconnect wrapped nsICookie2], "cookie-changed", "deleted") execTime: 251700 CM+ (coomanPlusCore.jsm:243:1): (debug):observe([xpconnect wrapped nsICookie2], "cookie-changed", "deleted") execTime: 251700 CM+ (cookiesmanagerplus.js:1125:1): (debug):observe([xpconnect wrapped nsISupports], "cookie-changed", "added") execTime: 251700 CM+ (coomanPlusCore.jsm:243:1): (debug):observe([xpconnect wrapped nsISupports], "cookie-changed", "added") execTime: 251700 CM+ (cookiesmanagerplus.js:595:1): (debug):loadCookies("") execTime: 251700 CM+ (cookiesmanagerplus.js:604:1): (debug):[deleteExpired: false] loadCookies("") execTime: 251700 CM+ (treeUtils.js:42:1): (debug):[sort begin] sortTreeData([object XULElement], [object Object]) execTime: 251700 CM+ (treeUtils.js:111:1): (debug):[sort end] sortTreeData([object XULElement], [object Object]) execTime: 0 [251700] CM+ (cookiesmanagerplus.js:1311:1): (debug):selectLastCookie(undefined) execTime: 251700 CM+ (cookiesmanagerplus.js:438:1): (debug):cookieSelectedEvent([object Event]) execTime: 251700 CM+ (cookiesmanagerplus.js:1453:1): (debug):[,false] cookieSelected() execTime: 251700 CM+ (cookiesmanagerplus.js:704:1): (debug):_updateCookieData([object Object], 0) execTime: 251700 CM+ (cookiesmanagerplus.js:1529:1): (debug):UI_EnableCookieBtns(true, true) execTime: 251700 CM+ (cookiesmanagerplus.js:1453:1): (debug):[,false] cookieSelected(undefined) execTime: 251700 CM+ (cookiesmanagerplus.js:704:1): (debug):_updateCookieData([object Object], 0) execTime: 251700 CM+ (cookiesmanagerplus.js:1529:1): (debug):UI_EnableCookieBtns(true, true) execTime: 251700 CM+ (cookiesmanagerplus.js:1453:1): (debug):[,false] cookieSelected() execTime: 251700 CM+ (cookiesmanagerplus.js:704:1): (debug):_updateCookieData([object Object], 0) execTime: 251700 CM+ (cookiesmanagerplus.js:1529:1): (debug):UI_EnableCookieBtns(true, true) execTime: 251700 getFirstPartyURI failed for chrome://cookiesmanagerplus/content/cookiesmanagerplus.xul: 0x80070057 CM+ (editCookie.js:245:1): (debug):uninit() execTime: 251800 CM+ (editCookie.js:966:1): (debug):settingsBackup() execTime: 251800 CM+ (commonFunc.js:569:1): (debug):protect_CookieKeeper_unload() execTime: 251800 CM+ (commonFunc.js:573:1): (debug):[protect observer removed] protect_CookieKeeper_unload() execTime: 251800 CM+ (string): [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://cookiesmanagerplus/content/commonFunc.js :: protect_CookieKeeper_unload :: line 574" data: no] protect_CookieKeeper_unload@chrome://cookiesmanagerplus/content/commonFunc.js:574:5 protect_unload@chrome://cookiesmanagerplus/content/commonFunc.js:422:4 uninit@chrome://cookiesmanagerplus/content/editCookie.js:281:4 unload@chrome://cookiesmanagerplus/content/editCookie.js:240:3 onunload@chrome://cookiesmanagerplus/content/editCookie.xul:1:1

CM+ (editCookie.js:289:1): (debug):[finished] uninit() execTime: 251800 CM+ (cookiesmanagerplus.js:532:1): (debug):onPrefChange_do([xpconnect wrapped nsIPrefBranch], "nsPref:changed", "persist") execTime: 251800
vanowm commented 8 years ago

It looks like the cookie is added and immediately deleted. Perhaps it's some privacy settings in your browser or other extension that interfere. Would you be willing try CM+ with all other addons disabled, so we can rule out other extensions interference?

Note, CM+ can't see cookies from windows in private mode.

juhiyu commented 8 years ago

I'm running Tor browser in its default state with default addons (https-e, noscript, tor addons) so no additional privacy settings are modified on my end.

I do feel it is something to do with private browsing as that was my thought when I filed the issue.

Also noted that despite having cookies like being logged in on github even native tor browser cookies viewer shows no cookies. But when I add cookie via CM+ it appears in the native viewer (even though it doesn't show up at all in headers)

juhiyu commented 8 years ago

EDIT: I just tried it and CM+ works if I modify the default settings and using custom Firefox privacy settings:

Don't tick - 'Always use Private Browsing mode' or 'Clear History on exit' Tick Remember browser history, search history, accept cookies from sites, accept third party always, keep until they expire.

Using this CM+ looks to work as expected. So I am 99% sure it is to do private browsing. Though, I am not sure how your CM+ works in Tor browser default settings

vanowm commented 8 years ago

Yes, indeed it's private mode. I just reset Tor's settings to default and indeed it deletes cookies as soon as they created. This is not CM+ issue. Unfortunately I can't find any useful information how to access and manage cookies from private mode windows.

It's not Tor related though, so no point in keeping this issue opened.

juhiyu commented 8 years ago

So what does this mean - you need to find a way so CM+ can access cookies in PB mode or need to file bug with Mozilla to implement a way to do it?

edit: found this bug report https://bugzilla.mozilla.org/show_bug.cgi?id=823941

vanowm commented 8 years ago

I suspect PB mode is meant to be private and there is no API to tap into it, otherwise it would be pointless for it to exist in the first place.

vanowm commented 8 years ago

I guess I'll keep this issue opened, until a way access private cookies is found.