GoogleChrome / related-website-sets

Apache License 2.0
413 stars 507 forks source link

Why is storage access for not working? (getting `requestStorageAccessFor: Permission denied.`) #168

Closed anushshukla closed 10 months ago

anushshukla commented 10 months ago

The Top-down approach mentioned on the page wasn't working as expected. Getting an error on the https://rws-member-glitch.me/request-storage-access.html page for Permissed denied. STEPS FOLLOWED:

  1. Opened Google Chrome with local related sets: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --use-related-website-set="{\"primary\": \"https://related-website-sets.glitch.me/\", \"associatedSites\": [\"https://rws-member-1.glitch.me/\"]}" \ https://related-website-sets.glitch.me/ --incognito
  2. Selected Top-down approach and got redirected to https://rws-member-1.glitch.me/request-storage-access-for.html
  3. Clicked on the Click for Cookies button, and got the error requestStorageAccessFor: Permission denied.

We tried the same with an actual RWS of https://wingify.com and https://vwo.com are RWS as seen in the screenshot below.

image

We're trying to access first-party cookies of https://vwo.com in https://wingify.com by using await document.requestStorageAccessFor('https://vwo.com') which throws "Permission denied" and the same can be observed below in the below screenshot.

image

Could we please help us in getting this work?

cfredric commented 10 months ago

Hi @anushshukla,

RWS is disabled in incognito profiles. (We recently fixed a bug in the chrome://system UI to reflect this properly.) Please try again using a regular, non-incognito profile.

anushshukla commented 10 months ago

Thanks for the quick response! Just acknowledging that document.requestStorageAccessFor works in the non-incognito mode of the Google Chrome browser.

Is document.requestStorageAccessFor going to be supported in Chrome incognito and other browsers like Safari, Firefox, etc.?

cfredric commented 10 months ago

No, Chrome doesn't currently have plans to support RWS (and by extension, document.requestStorageAccessFor) in incognito profiles, to my knowledge.

Chrome incognito profiles (and Safari and Firefox) do support document.requestStorageAccess(), however.

(However, note that in Chrome, the top-level user gesture requirement will often prevent the embed from prompting the user in incognito mode, by design. But that doesn't change much, since in an incognito profile, the profile's cookie jar is likely empty anyway.)