The problem is solved by using storeId:
async function getCookie(name, url) {
const stores = await browser.cookies.getAllCookieStores();
for (const store of stores) {
const cookie = await browser.cookies.get({ name, url, storeId: store.id });
if (cookie) return cookie;
}
return null;
}
Topic:
Safari & Web
SubTopic:
General
Tags: