Page 2 of 2
Re: Update to CEF 75.0.7
Posted: Mon Jun 17, 2019 7:39 pm
by salvadordf
Now that I think of it... I should restore the GlobalCEFApp.DeleteCookies property and delete the "Cookies" and "Cookies-journal" files when CEF is initialized.
GlobalCEFApp.DeleteCache should delete the other cache files.
Re: Update to CEF 75.0.7
Posted: Tue Jun 18, 2019 7:15 pm
by thefunkyjoint
It seems there is some bug on this new version related to cache / cookies...
When i test to log in on Facebook, after i type my user and password, it returns to the blank login page, like i did not typed my login info. And after that , when i navigate to Facebook again, i'm logged... All this weird stuff did not happened before.
It's easy to reproduce :
1 - Navigate to
www.facebook.com
2 - Enter your email / password and submit
3 - Facebook will go back to the login page.
4 - Navigate again to
www.facebook.com
Maybe i'm missing something ?
Re: Update to CEF 75.0.7
Posted: Tue Jun 18, 2019 8:00 pm
by salvadordf
My mistake.
Wrong default values for one of the new classes. I'll upload the fix with a few other improvements tomorrow.
Re: Update to CEF 75.0.7
Posted: Tue Jun 18, 2019 8:42 pm
by thefunkyjoint
Great, looking forward to this
Thanks
Re: Update to CEF 75.0.7
Posted: Wed Jun 19, 2019 1:19 am
by snoop
hello! something is wrong with proxies.
authorization doesn't work. it gives 407 error - "407 Proxy Authentication Required Access to requested resource disallowed by administrator or you need valid username/password to use this resource"
I did not change anything in code, everything worked before
Re: Update to CEF 75.0.7
Posted: Wed Jun 19, 2019 2:37 am
by rgdawson
salvadordf wrote: Mon Jun 17, 2019 7:37 pm
rgdawson wrote: Mon Jun 17, 2019 5:22 pm
Uh oh. In my app cookies are (were) persistent, but the cache is memory (not persistent). I take it this means I can't do it that way anymore?
I guess you could store the cache in a temporal directory and delete some of its files before initializing CEF in the browser process.
I could be wrong but I think that the files called "
Cookies" and "
Cookies-journal" store the cookies in the cache directory.
If you delete all the other files inside that directory your application should behave as if the cache was not persistent.
Your idea works fine. At first I was dismayed at how long it took to delete all the cache file (~3 seconds), so I got to wondering how CEF4Delphi could do the same thing instantly and have all the files out of the way by the time CEF starts up. So I looked at CEF4Delphi code and found a routine called "RenameAndDeleteDir". It renames the folder first (instantly out of the way), then deletes all the files asynchronously in a thread. That is so clever! So I learned a new trick. Thanks!
Re: Update to CEF 75.0.7
Posted: Wed Jun 19, 2019 3:09 pm
by salvadordf
snoop wrote: Wed Jun 19, 2019 1:19 am
hello! something is wrong with proxies.
authorization doesn't work. it gives 407 error - "407 Proxy Authentication Required Access to requested resource disallowed by administrator or you need valid username/password to use this resource"
I did not change anything in code, everything worked before
I tested several HTTP, SOCKS4 and SOCKS5 free proxies with the MiniBrowser demo and all of them worked correctly.
None of those proxies needed a username and a password but the CEF4Delphi code that updates the proxy preferences has not changed lately.
Chromium doesn't support SOCKS5 proxies that require authentication. If you were trying to use a SOCKS5 proxy that requires a username and a password you will not be able to use it.
Re: Update to CEF 75.0.7
Posted: Wed Jun 19, 2019 7:06 pm
by snoop
salvadordf wrote: Wed Jun 19, 2019 3:09 pm
snoop wrote: Wed Jun 19, 2019 1:19 am
hello! something is wrong with proxies.
authorization doesn't work. it gives 407 error - "407 Proxy Authentication Required Access to requested resource disallowed by administrator or you need valid username/password to use this resource"
I did not change anything in code, everything worked before
I tested several HTTP, SOCKS4 and SOCKS5 free proxies with the MiniBrowser demo and all of them worked correctly.
None of those proxies needed a username and a password but the CEF4Delphi code that updates the proxy preferences has not changed lately.
Chromium doesn't support SOCKS5 proxies that require authentication. If you were trying to use a SOCKS5 proxy that requires a username and a password you will not be able to use it.
no, I use http proxies with authentication. it worked before (both proxies and my project). If you remember, similar bug was in one of previous updates. Then you found out that you made something wrong in initialization or something like that.
So make deep check with HTTP with auth proxies
Re: Update to CEF 75.0.7
Posted: Wed Jun 19, 2019 8:13 pm
by salvadordf
I tested some websites with HTTP authentication and it works.
TChromium uses the same event to get the username and password for proxies and for websites with HTTP authentication.
Please, set a breakpoint here :
https://github.com/salvadordf/CEF4Delph ... .pas#L3642
Run your application and try to use your proxy server.
Delphi should stop at that breakpoint and it should execute the
callback.cont(FProxyUsername, FProxyPassword) line to send your username and password.
If you have any issue please try adding this code line before the
GlobalCEFApp.StartMainProcess call in the DPR file and test your app again :
Code: Select all
GlobalCEFApp.DisableFeatures := 'NetworkService';
Re: Update to CEF 75.0.7
Posted: Wed Jun 19, 2019 10:10 pm
by snoop
Hello, Savlador
Thank you, disabling this helped:
GlobalCEFApp.DisableFeatures := 'NetworkService';