Closed AnhDQHE181109 closed 6 years ago
Could you paste an example of the JSON file that you are trying to import? Feel free to completely redact the values of the cookies; I am only interested in the cookie structure and keys. One of the known ways to fail importing is #15, which I intend to fix.
{ "cookieManagerVersion": "1.4", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0", "cookies": [ { "name": "datr", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": true, "session": false, "expirationDate": 1594469240, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "locale", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": false, "session": false, "expirationDate": 1532002040, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "sb", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": true, "session": false, "expirationDate": 1594469288, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "pl", "value": "n", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": true, "session": false, "expirationDate": 1539173288, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "spin", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": true, "session": false, "expirationDate": 1531581353, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "c_user", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": false, "session": false, "expirationDate": 1539307310, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "xs", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": true, "session": false, "expirationDate": 1539307310, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "fr", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": true, "session": false, "expirationDate": 1539307310, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "presence", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": false, "session": true, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "act", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": false, "session": true, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "x-src", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": false, "session": false, "expirationDate": 1531531321, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "pnl_data2", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": false, "session": false, "expirationDate": 1531531322, "storeId": "firefox-default", "firstPartyDomain": "" }, { "name": "wd", "value": "", "domain": ".facebook.com", "hostOnly": false, "path": "/", "secure": true, "httpOnly": false, "session": false, "expirationDate": 1532136132, "storeId": "firefox-default", "firstPartyDomain": "" } ] }
So yeah, here's a session for it :v (Yea I deleted the values)
"storeId": "firefox-default"
means that the cookies are for non-private mode. Why did you expect the cookies to be added to your private browsing mode cookie store?
Do you just want the ability to copy (or move?) multiple cookies to a different browsing context? If so, then that would be possible once this feature request is implemented: #6
Hmmm, ye... So I tried to export the cookies from github in the normal mode. And I signed out, then imported the cookies I exported them. STILL nothing :/
Did you sign out by clicking sign out, or by deleting cookies?
Ehm... Clicking sign out?
A cookie serves as a way to identify the session. When you click "Sign out", then the server knows that the user does not want to continue the session any more, and it can stop accepting the cookie as an authentication method.
On the other hand, when you delete a cookie, the server does not know that the session of the cookie has ended (because it never received an explicit notification). In this case, the session can be resumed when you restore the cookie.
So that's mean I have to delete the old cookies if they're exist?
Only if you want to end the session in the original browsing mode.
If you want the cookie to be useful elsewhere, then you should not use the "Sign out" functionality of the website, but just copy the cookies. If you want to move the session that is associated with the cookie (i.e. "sign out" in the original browsing mode), remove the cookies for that cookie store.
Hmmm, so I tried to import the cookies again, then reload the cookie manager page, the cookies are applied :D So now, I'm thinking on how to stop github from replacing my cookies w/ its default one 🤔
then reload the cookie manager page
Tip: You don't need to reload the cookie manager, it suffices to click on the "Search" button again.
I'm thinking on how to stop github from replacing my cookies w/ its default one
Can you describe the exact steps that you took to test the scenario? If anything went wrong, then I can try to reproduce locally to see if there is a bug in my cookie manager.
- I signed out of github
If you used Github's "Sign out" button, then this step would have invalidated your cookies.
- Then back to the cookie manager tab and the old ones were gone
"old" as in the cookies that you imported? It is possible that Github has recognized that the cookies are unrecognized, and generated new cookies to start a new session.
If you want to test whether importing/exporting cookies are successful, replace step 5 with "Delete all cookies".
And/or before importing the cookies, you can even open a new private browsing window, replace "firefox-default"
with "firefox-private"
with a text editor and then import again. Then you can see whether you have succeeded in migrating cookies.
Oh well, that was weird... So I cleared the cache for github, then again I reimported the cookies. And, yea it worked flawlessly! :D Thanks for your support ;)
I mean, I really appreciate that :v
Ok, SO, I tried to export the cookies from my Facebook session, and then import them to the private browsing mode. But well... It didn't work :v I still don't understand why... When I imported it, and then click cancel to go back, nothing was applied :< Care to have some work arounds?