by ndesktop » Tue Jun 20, 2023 2:51 am
I cannot provide the cookie or the value (security reasons). But they are related to a login page for a chrome extension.
Maybe the SetCookie returns false in your case? I think of URL not matching the domain (or the prefixed .domain) or something else.
For verification I am looking to the Cookies sqlite database from the CefSettings's cache path, using any tool for SQLite db query, and then do a "seelct * from Cookies".
The test is:
- run first time, navigate to the URL to save cookies for and do the actions (login, visit etc.) that creates the cookies
- when the CEF app ends, save the cookies into some file and clear the cache path
- run second time and load the cookies from the previous file and do the SetCookie logic
- check the Cookies db file (might fail due to sharing violation)
- close the CEF app without clearing the Cookies file.
Result is that the second Cookies file contains the cookies set up via load from file + SetCookie from the second instance initialization.