mozilla/geckoview

Custom ContextID Getting 'firefox-default' as storeId

Closed this issue · 1 comments

I don't know if this is a bug or the expected behavior in Firefox. My goal is to set a different contextId in each Tab Group.

Setting ContextID

val sessionSettings = GeckoSessionSettings.Builder()
      .contextId("localhost")
      .build()

But the cookie storeId display as "firefox-default" it should be "firefox-container-localhost"

browser.cookies
  .getAll({})
  .then((cookies) => {
      for (const cookie of cookies) {
        console.log("Cookie:", cookie);
      }
});

Screenshot from 2024-06-27 09-41-27

But when I tried to use tab.query and getAllCookieStore, it displayed the correct cookieStoreId.

browser.tabs.query({}, (tabs) => {
     console.log("TAB : ",tabs);
});

Screenshot from 2024-06-27 09-28-51

browser.cookies.getAllCookieStores()
    .then((cookieStores) => {
        for (const store of cookieStores) {
              console.log("Cookie Store",store);
        }
  });

Screenshot from 2024-06-27 09-38-04

ok so the problem was on extension javascript api not in GeckoView