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: CEF cookies not remembered after upgrade from 90.6.70 to 91.1.211 #226

Closed
dasgarner opened this issue Aug 4, 2021 · 6 comments
Closed
Assignees
Labels
Milestone

Comments

@dasgarner
Copy link
Member

I tested this by scheduling xibo.org.uk to be displayed and then clicked OK on the cookie message. When the layout refreshes the cookie message re-appears.

I tried the same in v3 R300.5 and the cookie message does not re-appear when the layout refreshes.

For context we did also set a RequestContext between these releases, so that is also a candidate for the root cause.

webView.RequestContext = new CefSharp.RequestContext();

@dasgarner dasgarner added the bug label Aug 4, 2021
@dasgarner dasgarner added this to the 3 R302 milestone Aug 4, 2021
@dasgarner dasgarner self-assigned this Aug 4, 2021
@amaitland
Copy link

webView.RequestContext = new CefSharp.RequestContext();

This will use an in memory cache. Cookies won't be persisted.

https://github.com/cefsharp/CefSharp/wiki/General-Usage#request-context-browser-isolation

@dasgarner
Copy link
Member Author

Thanks for the link - we will provide a cache path in the next release

var requestContextSettings = new RequestContextSettings { CachePath = cachePath };

@amaitland
Copy link

RequestContextSettings.CachePath must be equal to or a child of CefSettings.RootCachePath see cefsharp/CefSharp#3111 (comment)

You'll also need to set RootCachePath

@dasgarner
Copy link
Member Author

Much appreciated - thank you!

dasgarner added a commit to dasgarner/xibo-dotnetclient that referenced this issue Sep 22, 2021
@s1nmorph
Copy link

s1nmorph commented Oct 3, 2021

Hey there @dasgarner i have been puzzling with this for a few days now as i am fairly new to all this, can you please help me implement the cookie structure in my form?
I do not know how to get cookies to work in my application, as i found your posts on the internet about cookies and cefsharp, but i am missing important steps i think, thank you in advance!

@dasgarner
Copy link
Member Author

It's great to see new people getting into C#/cef/programming! The best way to get help is to go ahead and ask your question on stackoverflow: https://stackoverflow.com/. Make sure you read the rules first and understand how to structure your question, giving as much information as possible.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants