Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Storage.GetCookies/SetCookies/ClearCookies CDP methods are not working #41703

Closed
3 tasks done
mxschmitt opened this issue Mar 26, 2024 · 0 comments · Fixed by #41718
Closed
3 tasks done

[Bug]: Storage.GetCookies/SetCookies/ClearCookies CDP methods are not working #41703

mxschmitt opened this issue Mar 26, 2024 · 0 comments · Fixed by #41718
Assignees
Labels
29-x-y 30-x-y bug 🪲 has-repro-comment Issue has repro in comments platform/all status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@mxschmitt
Copy link
Contributor

Preflight Checklist

Electron Version

all

What operating system are you using?

macOS

Operating System Version

N/A

What arch are you using?

x64

Last Known Working Electron version

never

Expected Behavior

Returns cookies.

Actual Behavior

Does throw:

  pw:protocol SEND ► {"id":102,"method":"Storage.getCookies","params":{}} +4ms
  pw:protocol ◀ RECV {"id":102,"error":{"code":-32000,"message":"Browser context management is not supported."}} +1ms

Testcase Gist URL

No response

Additional Information

Repro:

// @ts-check
const { app, BrowserWindow } = require('electron');

async function createWindow() {
  const win = new BrowserWindow({
    width: 800,
    height: 600,
  });
  win.webContents.debugger.attach('1.1');

  const result = await win.webContents.debugger.sendCommand('Storage.getCookies', {});
  console.log('done!', result);
}

app.whenReady().then(() => {
  createWindow().catch(e => console.error(e));
});
app.on('window-all-closed', function() {
  if (process.platform !== 'darwin')
    app.quit();
});

Relates to microsoft/playwright#12096
Allows us to remove these skipped tests: https://github.com/search?q=repo%3Amicrosoft%2Fplaywright%20%2FBrowser%20context%20management%20is%20not%20supported%2F&type=code

@codebytere codebytere added enhancement ✨ platform/all status/confirmed A maintainer reproduced the bug or agreed with the feature has-repro-comment Issue has repro in comments and removed enhancement ✨ labels Mar 26, 2024
@codebytere codebytere self-assigned this Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
29-x-y 30-x-y bug 🪲 has-repro-comment Issue has repro in comments platform/all status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
Status: 🛠️ Fixed for Next Release
Status: 👍 Does Not Block Stable
Development

Successfully merging a pull request may close this issue.

2 participants