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

webview cookies are not persisted #15365

Closed
steverandy opened this issue Oct 24, 2018 · 8 comments

Comments

Projects
None yet
5 participants
@steverandy
Copy link

commented Oct 24, 2018

  • Output of node_modules/.bin/electron --version: 4.0.0-beta.5
  • Operating System (Platform and Version): macOS 10.14
  • Output of node_modules/.bin/electron --version on last known working Electron version (if applicable): There is no issue with Electron v3.

Expected Behavior
Cookies should be persisted in a webview that uses partition.

Actual behavior
Cookies are lost after relaunching app.

To Reproduce

  1. Create webview with partition: <webview partition="persist:webview"/>
  2. Sign in to GitHub to create a cookie.
  3. Relaunch app.
  4. When webview opens again, the cookies are lost.
@alessandroliveri

This comment has been minimized.

Copy link

commented Oct 29, 2018

Hello! I would like to test the v4 can I ask if this regression will be fixed soon or if it's a minor fix and I have to wait for more? Thanks

@deepak1556

This comment has been minimized.

Copy link
Member

commented Oct 30, 2018

This is regression on the chromium side between 67-69, its fixed in 70 as verified with #15405, I am yet to identify the fix from upstream.

@alessandroliveri

This comment has been minimized.

Copy link

commented Oct 30, 2018

Thank you! 😃

@Tiny-Giant

This comment has been minimized.

Copy link

commented Nov 23, 2018

@deepak1556 any news on this? Currently the only way I've been ablle to find to get widevine working with a reasonably recent version of chrome installed is to use 4.0.X, but there's no persistence.

@alessandroliveri

This comment has been minimized.

Copy link

commented Nov 23, 2018

@Tiny-Giant I don't know if this can help you but I bypassed the problem with a save in local storage and reset the cookie on load app.

@KochiyaOcean

This comment has been minimized.

Copy link

commented Nov 25, 2018

@Tiny-Giant As a workaround, you can try saving cookie using session.fromPartition('persist:barfoo').cookies.get on exit and restore cookie using session.fromPartition('persist:barfoo').cookies.set on startup

KochiyaOcean added a commit to poooi/poi that referenced this issue Nov 25, 2018

@Tiny-Giant

This comment has been minimized.

Copy link

commented Nov 25, 2018

@Kochiya I haven't done a lot with sessions. This would just be done in the Main process correct? Or would I have to add a partition attribute to each webview?

@KochiyaOcean

This comment has been minimized.

Copy link

commented Nov 26, 2018

@Tiny-Giant If partition is not set, just use session.defaultSession.cookies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.