Closed zqff99 closed 14 hours ago
Thanks for reporting. Please use sameSite: "no_restriction"
-> https://developer.chrome.com/docs/extensions/reference/api/cookies#type-SameSiteStatus
Tampermonkey 5.2.6198 (crx) will now also report this issue via the error argument.
Just download the crx file linked above and drag and drop it to the extensions page chrome://extensions
(after you've enabled 'Developer Mode').
When the value of sameSite is set to Lax/Strict, it is successful. When it is set to None, the execution fails (execution should be allowed when secure is true).The browser is able to set sameSite to None using document.cookie.
Expected Behavior
Cookie set successfully.
Actual Behavior
The message port closed before a response was received.![image](https://github.com/Tampermonkey/tampermonkey/assets/50626023/b8466896-5224-42b0-9f63-14fc1ccbb85f)
Specifications
Script
GM_cookie.set({ url: 'https://www.google.com/', name: 'test', value: 'value111', domain: '.google.com', path: '/', secure: true, httpOnly: true, sameSite: "None", expirationDate: Math.floor(Date.now() / 1000) + (60 60 24 * 30) }, function(error) { if (error) { console.error(error); } else { console.log('Cookie set successfully.'); } });