Page 1 of 1

Cookies are not storing after closing the app

Posted: Thu Mar 26, 2020 10:33 pm
by smliveinc
My code in project source:

Code: Select all

GlobalCEFApp := TCefApplication.Create;
  GlobalCEFApp.Cache            := 'C:\0\cache';
  GlobalCEFApp.OnWebKitInitialized := GlobalCEFApp_OnWebKitInitialized;
if GlobalCEFApp.StartMainProcess then
  begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;

  End;
GlobalCEFApp.Free;
GlobalCEFApp := nil;
And in form I using just;

Code: Select all

ChromiumWindow1.ChromiumBrowser.LoadURL('https://vk.com/');
Next I login in browser, closing application, opening again and see login has reset.
However, C:\0\cache is creating, has file with cookies and it probable (checked in hex-editor) has cookies for vk.com.
And same code works with CEF4Delphi 79 (last release on GitHub)! But not works with 80.0.4.0 and 80.0.8.0

Re: Cookies are not storing after closing the app

Posted: Fri Mar 27, 2020 10:33 am
by salvadordf
There's a known issue in the CEF libraries with the cookies.

CEF 80 deletes all the cookies when you navigate to any URL for the first time :
https://bitbucket.org/chromiumembedded/ ... omatically

Use the last CEF4Delphi release, which uses CEF 79.