Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Error Cache Miss -400 - Frame LoadUrl
-
- Posts: 25
- Joined: Thu Sep 21, 2017 4:33 pm
Error Cache Miss -400 - Frame LoadUrl
Hello Salvador!
After updating from 3.3163.1671 to version 3.3239.1723 I'm facing problem when I call following code I get error code "ERR_CACHE_MISS", code "-400";
ChromiumBrowser.Browser.StopLoad;
ChromiumBrowser.Browser.GetFrame('framename').LoadUrl('https://www.someurl.com');
Do you have any idea what causes the error?
Thank you!
After updating from 3.3163.1671 to version 3.3239.1723 I'm facing problem when I call following code I get error code "ERR_CACHE_MISS", code "-400";
ChromiumBrowser.Browser.StopLoad;
ChromiumBrowser.Browser.GetFrame('framename').LoadUrl('https://www.someurl.com');
Do you have any idea what causes the error?
Thank you!
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Error Cache Miss -400 - Frame LoadUrl
ERR_CACHE_MISS is a Chromium error code that is usually caused by navigating to a page with POST data via back or forward buttons.
Sometimes it can be solved clearing the cache.
Here you have more information :
https://usefulpcguide.com/17838/err_cache_miss/
Sometimes it can be solved clearing the cache.
Here you have more information :
https://usefulpcguide.com/17838/err_cache_miss/
-
- Posts: 25
- Joined: Thu Sep 21, 2017 4:33 pm
Re: Error Cache Miss -400 - Frame LoadUrl
But I do not understand why in the previous version it worked. No line of code was changed.
What would be the method to clear the cache?
Would doing this exclude cookies as well? I need to keep a session with cookies.
What would be the method to clear the cache?
Would doing this exclude cookies as well? I need to keep a session with cookies.
-
- Posts: 25
- Joined: Thu Sep 21, 2017 4:33 pm
Re: Error Cache Miss -400 - Frame LoadUrl
I noticed that this only occurs when I pass a parameter via query string.
Something like:
https://www.google.com/?lang=en-us
Something like:
https://www.google.com/?lang=en-us
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Error Cache Miss -400 - Frame LoadUrl
Maybe that web page has a form that can't be cached.
The cause of that error is usually what I commented in my previous post but it could be caused by internal changes or new issues in Chromium.
If you search in Google you will find some Chromium issues about this a few years ago.
I don't work for Google and I'm not an expert in Chormium but you can copy the cache directory in another drive and make some tests.
To clear the cache you have to close your application and delete the contents of the directory you used in GlobalCEFApp.cache.
If you left the GlobalCEFApp.cookies property blank then the cookies are stored in the cache directory too.
The cause of that error is usually what I commented in my previous post but it could be caused by internal changes or new issues in Chromium.
If you search in Google you will find some Chromium issues about this a few years ago.
I don't work for Google and I'm not an expert in Chormium but you can copy the cache directory in another drive and make some tests.
To clear the cache you have to close your application and delete the contents of the directory you used in GlobalCEFApp.cache.
If you left the GlobalCEFApp.cookies property blank then the cookies are stored in the cache directory too.
-
- Posts: 25
- Joined: Thu Sep 21, 2017 4:33 pm
Re: Error Cache Miss -400 - Frame LoadUrl
Would you have an example of how to load a request in the browser instead of a url?
I would like to test if a request would not cause the error to occur.
I would like to test if a request would not cause the error to occur.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Error Cache Miss -400 - Frame LoadUrl
This is an example for DCEF3 but it should work in CEF4Delphi :
https://stackoverflow.com/questions/129 ... h-chromium
https://stackoverflow.com/questions/129 ... h-chromium
-
- Posts: 25
- Joined: Thu Sep 21, 2017 4:33 pm
Re: Error Cache Miss -400 - Frame LoadUrl
Hello Salvador! Me again!
I still couldn't to solve that issue. For that reason, I'd like you help me, if you could.
When I call the method directly in TCromium I get following results
//-- Here occurs error 400
ObjChromium.Browser.GetFrame('body').LoadUrl(someUrl);
//-- Here DO NOT occurs (I can't use MainFrame because I need load new pages on "body" frame)
ObjChromium.Browser.MainFrame.LoadUrl(someUrl);
//-- Here DO NOT occurs error (using javascript)
ObjChromium.MainFrame.ExecuteJavaScript('window.document.body.body.location="'+fullUrl+'"', '', 0);
Due to the circumstance that the error occurs I'm believing that it could be some bug, since this did not happen in older versions. The latest version that you provided also occurs.
Could that be this related to some unknowed CEF bug?
I still couldn't to solve that issue. For that reason, I'd like you help me, if you could.
When I call the method directly in TCromium I get following results
//-- Here occurs error 400
ObjChromium.Browser.GetFrame('body').LoadUrl(someUrl);
//-- Here DO NOT occurs (I can't use MainFrame because I need load new pages on "body" frame)
ObjChromium.Browser.MainFrame.LoadUrl(someUrl);
//-- Here DO NOT occurs error (using javascript)
ObjChromium.MainFrame.ExecuteJavaScript('window.document.body.body.location="'+fullUrl+'"', '', 0);
Due to the circumstance that the error occurs I'm believing that it could be some bug, since this did not happen in older versions. The latest version that you provided also occurs.
Could that be this related to some unknowed CEF bug?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Error Cache Miss -400 - Frame LoadUrl
Have you tried loading that URL in a HTML frame without CEF?
Some websites block that kind of requests.
Create a simple web page in your server with some frames and load that URL in one of them. Then try to visit your website with Chrome to see the results.
Some websites block that kind of requests.
Create a simple web page in your server with some frames and load that URL in one of them. Then try to visit your website with Chrome to see the results.
-
- Posts: 25
- Joined: Thu Sep 21, 2017 4:33 pm
Re: Error Cache Miss -400 - Frame LoadUrl
Hello Salvador!
I've created(changed your simplebrowser demo) a small sample reproducing the issue.
If you could test it would be nice
https://goo.gl/bymDXs
The error behavior is weird:
1) If you open the application and click the first time in the option to load through the GetFrame method, error occurs.
2) If you open the application and at least once load the frame "body" through javascript, in the following requests using GetFrame the error does not occur anymore.
Thank you!
I've created(changed your simplebrowser demo) a small sample reproducing the issue.
If you could test it would be nice
https://goo.gl/bymDXs
The error behavior is weird:
1) If you open the application and click the first time in the option to load through the GetFrame method, error occurs.
2) If you open the application and at least once load the frame "body" through javascript, in the following requests using GetFrame the error does not occur anymore.
Thank you!