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
Closed

webview cookies are not persisted #15365

steverandy opened this issue Oct 24, 2018 · 8 comments
Labels
4-2-x bug/regression ↩️ A new version of Electron broke something platform/all status/reviewed A maintainer made an initial review but not reproduced the issue

Comments

@steverandy
Copy link

  • 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.
@deepak1556 deepak1556 added bug/regression ↩️ A new version of Electron broke something status/reviewed A maintainer made an initial review but not reproduced the issue platform/all 4-2-x labels Oct 24, 2018
@deepak1556 deepak1556 self-assigned this Oct 24, 2018
@alessandroliveri
Copy link

alessandroliveri 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
Copy link
Member

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
Copy link

Thank you! 😃

@Tiny-Giant
Copy link

Tiny-Giant 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
Copy link

@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
Copy link

@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

@Tiny-Giant
Copy link

@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
Copy link

@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
Labels
4-2-x bug/regression ↩️ A new version of Electron broke something platform/all status/reviewed A maintainer made an initial review but not reproduced the issue
Projects
None yet
Development

No branches or pull requests

5 participants