Closed
Bug 1504690
Opened 6 years ago
Closed 6 years ago
Content blocking break Google API usage
Categories
(Firefox :: Protections UI, defect)
Firefox
Protections UI
Tracking
()
RESOLVED
DUPLICATE
of bug 1505212
People
(Reporter: ochameau, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [privacy65])
This page is using Google API to fill a Spreadsheet, but it is broken when Content blocking is enabled (default on nightly):
https://firefox-dev.tools/performance-dashboard/perfherder/?test=cold.inspector.open&days=14&filterstddev=true&ignore-flags=true
It breaks Google API because of cookie's restriction. It works again if:
* I disable content blocking for this website
* I disable "Third-Party Cookies" blocking in about:preferences
I imagine it is related to this warning:
Request to access cookie or storage on “https://apis.google.com/js/api.js” was blocked because it came from a tracker and content blocking is enabled.
Updated•6 years ago
|
Whiteboard: [privacy65][triage]
Comment 1•6 years ago
|
||
Thanks for the bug report, Alexandre.
Do you know which Google API this site using which may be hitting this problem by any chance? Looks like it uses the Google Charts API, but I thought perhaps you may know more about what goes on behind the hood?
Blocks: etp-breakage, etp-level-2-list
Flags: needinfo?(poirot.alex)
Comment 2•6 years ago
|
||
Looking at this more closely under the debugger, I see the same exception as we saw in bug 1505212 ("sessionStorage is not available...") here as well, so perhaps the fix to that bug could be applied here too (there is an accounts.google.com iframe present!)
See Also: → 1505212
Reporter | ||
Comment 3•6 years ago
|
||
Yes, that's the same exception! Thanks for having looked into it in detail. It is not clear why this exception was silent. Shouldn't the rejected promise be reported?
I reduced the testcase to the bare minimum and added a console.log to highlight this exception:
gapi.client.init error
Object { error: "idpiframe_initialization_failed", details: "sessionStorage is not available in the current environment." }
Which you can retrigger at any moment by running:
gapi.client.init({
apiKey: API_KEY,
clientId: CLIENT_ID,
discoveryDocs: DISCOVERY_DOCS,
scope: SCOPES
}).then(function () {
// Handle the initial sign-in state.
const isSignedIn = gapi.auth2.getAuthInstance().isSignedIn.get();
console.log("is signed in", isSignedIn);
resolve();
}, error => {
console.log("gapi.client.init error", error);
});
Flags: needinfo?(poirot.alex)
Reporter | ||
Comment 4•6 years ago
|
||
Oh, I forgot the URL of the reduced test case:
https://firefox-dev.tools/performance-dashboard/googleapi/index.html
Comment 5•6 years ago
|
||
This is fixed with the patch in bug 1505212.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Whiteboard: [privacy65][triage] → [privacy65]
You need to log in
before you can comment on or make changes to this bug.
Description
•