question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Cookies not supported with Electron

See original GitHub issue

I’m using Playwright to run end-to-end tests for an Electron app. I have a use case for cookies, but it appears none of the cookies commands exist on the BrowserContext with Electron.

I assumed they would have the same API, but upon trying to get cookies:

const context = await app.context()
await context.cookies()

I get this error:

browserContext.cookies: Protocol error (Storage.getCookies): Browser context management is not supported.

Is cookies not supported for Electron + Playwright, or is there a workaround?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:9
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dgozmancommented, Feb 14, 2022

@taniarascia Indeed, some feature are not working with Electron, that’s why it is still experimental 😄 I don’t think there is an easy workaround today.

0reactions
RADDEVcommented, Nov 2, 2022

upvote for electron support!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cookies module not working in Electron app - Stack Overflow
The electron-cookies package it is meant to be used in the renderer process, you're attempting to use it in the main/browser process. In...
Read more >
Send cookies in Electron + React app - Coding Out Loud
In this article I discuss using cookies to make an authenticated web call to an external ... import electron from 'electron'; function ......
Read more >
Class: Cookies | Electron
Query and modify a session's cookies. Process: Main This class is not exported from the 'electron' module. It is only available as a...
Read more >
Set Cookie doesn't work in new BrowserWindow : r/electronjs
I want to set a new 'Cookie' for a new BrowserWindow that I create inside the app, it is not the main app...
Read more >
Create a Todo List app with Electron, JavaScript and AG Grid
No Node-specific code is allowed. To communicate between processes (e.g., to handle data transfer or invoke native functionality from the UI), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found