Closed Bug 1168752 Opened 10 years ago Closed 5 years ago

Pocket button does not remember signing in permanent private browsing

Categories

(Firefox :: Pocket, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE
Tracking Status
firefox41 --- affected
firefox49 --- affected
firefox50 --- affected
firefox51 --- affected
firefox52 --- wontfix

People

(Reporter: bmaris, Unassigned)

Details

Attachments

(1 file)

Affected builds: - latest Nightly - latest Aurora - Firefox 39 beta 1 Affected platforms: - Mac OS X 10.9.5 - Ubuntu 14.04 32-bit - Windows 7 64-bit Steps to reproduce: 1. Start Firefox 2. Enter Options and select Privacy 3. From History, select 'Nightly will: Never remember history' 4. Follow the options Firefox asks in order to activate permanent private mode 5. Click Pocket button and login with an existing account, or create one 6. Visit a random website (eg: http://www.wikipedia.org/) 7. Click Pocket button Expected result: Page is saved to Pocket and the proper pop-up is shown. Actual result: Pop-up with sign-in/sign-up appears. Notes: 1. This is reproducible _only_ if I sign-in/sign-up after entering permanent private mode. 2. This is not a regression, it reproduces with an old Nightly (2015-05-03) from when pocket was default enabled.
Just to chime in - this is the #1 support issue we are seeing on the Pocket Support side of things right now.
This is an issue with how Pocket and private browsing works. Pocket looks in the cookie store to see if the user is logged in. It does this by requesting the cookies for the pocket domain. To fix this, Pocket would need to look in the private browsing cookie store when the browser is in private browsing mode. However, queries to the private browsing cookie store per domain are not currently possible. This would require a query for *all* cookies to be returned from the private browsing cookie store and then filtered on the front-end for cookies in the pocket domain. Ideally, the fix here is to update the cookie store API to allow a query for a specific domain that is also in private browsing. Then the front-end can tweak which API to use.
I've been told by Pocket Support that this is the top technical issue[1] they're seeing support requests for. They've already written a KB article with a workaround[2]. We'll be doing the same. [1]I've asked for more details on just what kind of support volume they're seeing for this issue. [2] http://help.getpocket.com/customer/portal/articles/2003374-trouble-saving-to-pocket---stuck-in-a-%22loop%22
This bug is apparently the source of around half of Pocket's Firefox related support tickets. In terms of Pocket bugs, this one should be considered higher priority.
@jaws: is there any example of querying the private cookie data store? The only mechanism I've found to get at cookies in a private window is to observe "private-cookie-changed". Services.obs.addObserver(function onNotification(aSubject, aTopic, aData) { let c = aSubject.QueryInterface(Ci.nsICookie2); Cu.reportError(aTopic + "-" + aData + " host "+ c.rawHost); }, "private-cookie-changed", false);
Flags: needinfo?(jaws)
I don't believe there is one. As I understand it, you would have to iterate through all private cookies too to find the one you are looking for.
Flags: needinfo?(jaws)
In terms of just querying the private cookie store, just look at how the regular cookie store is queried, and I *think* that function takes a different argument/ID to request the private cookie store. It won't be efficient though, as comment #3 describes.
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #8) > In terms of just querying the private cookie store, just look at how the > regular cookie store is queried, and I *think* that function takes a > different argument/ID to request the private cookie store. It won't be > efficient though, as comment #3 describes. I've looked, I see no way to get cookies at all.
And I think this bug is more extensive than it initially sounds. - open non-private browsing session - login to pocket - open private window - login to pocket in private window with a different pocket account - open pocket button (in the private window) to save a page which account do you think the page is saved to? I'm betting on the first.
I've looked at cookie code enough now that I'm convinced there is no easy way to retrieve cookies in private windows. Given the way things are loaded, there are two viable options. 1) disable pocket in private browsing mode 2) pocket would need to set the cookies as session cookies on each request so that they are in document.cookie, at which point we can retrieve them using nsICookieService.getCookieString A third option is much more effort, make nsICookieService fully work with the private data store.
Attached file privatecookies.js
sample showing how session cookies for a domain can be retrieved in pb mode.
An alternative I attempted is to observe the "private-cookie-changed" notification. This works so long as the observer is setup prior to logging into pocket. As we move to using addons it is possible to log into pocket, then enable the addon, thus missing the cookies when they are initially set.
Mass wontfix for bugs affecting firefox 52.

This bug has been closed due to inactivity and/or the potential for this bug to no longer be an issue with the new Discovery Stream-powered New Tab experience, and improvements to Pocket’s integration with Firefox.

Please help us triage by reopening if this issue still persists and should be addressed.

Thanks!

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: