Closed
Bug 1362928
Opened 7 years ago
Closed 7 years ago
Calling browser.contextualIdentities.query({}) multiple times results in undefined contextual Identity objects
Categories
(WebExtensions :: General, defect, P1)
WebExtensions
General
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: mrdokenny, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: investigating)
Attachments
(2 files, 1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0 Build ID: 20170507030205 Steps to reproduce: Install Cookie AutoDelete Turn on "Enable Support for Firefox's Contextual Identities" in the options. Try a Cookie Cleanup in the popup. Actual results: Cookie Cleanup results in errors because it needs the cookieStoreId from browser.contextualIdentities.query({}) to be passed into browser.cookies.remove(), but it is undefined in Firefox 55. See screenshot. Expected results: Cookie cleanup should have completed with a notification. One workaround I had to do was cache the contextualIdentities objects so I wouldn't have to call browser.contextualIdentities.query({}) over and over. Also, that extension with "Enable Support for Firefox's Contextual Identities" enabled works fine in 53-54. I think it must be bug 1350522, since that's the only change I see from: https://hg.mozilla.org/mozilla-central/filelog/17d8a1e278a9c54a6fdda9d390abce4077e55b20/toolkit/components/extensions/ext-contextualIdentities.js
Updated•7 years ago
|
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Keywords: regression
Updated•7 years ago
|
Blocks: ContextualIdentity
Comment 2•7 years ago
|
||
This looks pretty bad, do you need any help replicating or anything?
Flags: needinfo?(kmaglione+bmo)
Updated•7 years ago
|
Priority: -- → P1
Updated•7 years ago
|
Whiteboard: investigating
I see some error in Firefox 55 with this extension, this may be because 55 is Bete instead Nightly for now, and privacy.userContext.enabled is disabled by default in Beta for now. This issue may be due to the implementation of the extension. The `contextualIdentitiesEnabled` is incorrect, it may be changed while in use, from Options or about:config with privacy.userContext.enabled. You should use `browser.contextualIdentities.query({});` to detect its status. p.s. I have not tried to reproduce this problem.
I detailed the issue in: https://github.com/mrdokenny/Cookie-AutoDelete/issues/41 I did do feature detection for that API, but that's not the issue, the issue is that browser.contextualIdentities.query({}) breaks (horribly until browser restart) when you pass the results to browser.cookies.remove() using the parameter cookieStoreId.
Flags: needinfo?(mrdokenny)
Comment 5•7 years ago
|
||
Going to look into this tomorrow to test and see where we are at least.
Assignee: nobody → jkt
Hey thanks. FWIW, I can't reproduce it now in the latest Nightly 8/16 with the old 1.1.0b1, so I'm not entirely sure what happened between a couple months ago and now. I haven't tested with the other versions yet.
Comment 7•7 years ago
|
||
Also just to highlight container APIs are either enabled or not, using browser.contextualIdentities.query({}); to check if it's present will no longer work in Nightly 57. For Nightly users by adding the permission in your manifest you will have the APIs for certain, for 55+56 checking a false response from browser.contextualIdentities.query({}); might be better yeah.
With the 2.X.X branch, I removed the cache and started directly accessing browser.contextualIdentities.query({}) again. What I noticed is in 55, there's still some problems with Containers Mode on. However, on 56+, I haven't noticed any issues.
Fresh build of C-AD 2.0.0
Attachment #8865327 -
Attachment is obsolete: true
Comment 10•7 years ago
|
||
Bulk change per https://bugzilla.mozilla.org/show_bug.cgi?id=1401020
status-firefox57:
--- → fix-optional
Updated•7 years ago
|
Comment 12•7 years ago
|
||
Based on comment 6 and comment 8, it seems like we should close this?
Comment 13•7 years ago
|
||
SGTM, closing also.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Updated•6 years ago
|
Product: Toolkit → WebExtensions
Updated•6 years ago
|
status-firefox57:
wontfix → ---
Flags: needinfo?(kmaglione+bmo)
You need to log in
before you can comment on or make changes to this bug.
Description
•