Welcome Guest Search | Active Topics | Sign In | Register

Moving to EO 23.2.14 from EO 23.1.77 and Chrome Debugger issues Options
JW
Posted: Friday, May 26, 2023 8:12:46 AM
Rank: Advanced Member
Groups: Member

Joined: 2/8/2019
Posts: 57
Noticed a bit of a funny, and thought worth posting here in case anyone else hits it.

We noticed when moving to EO 23.2.14 that the "Sources" tab in the Chrome debugger wouldn't display anything (it was completely blank, no error messages, no list of files).

TabbedBrowser didn't show this issue.

After digging further and making our app look more like TabbedBrowser, it became clear this was because we were setting a CachePath (i.e. Runtime.DefaultEngineOptions.CachePath = ...)

This is set to something like the following:
C:\Users\XXXX\AppData\Local\Microsoft\Windows\INetCache\XXXXXXX\Cache

Cleaning out this cache folder (i.e. deleting everything in it) brought the "Sources" tab in the Chrome debugger back to life. Our app didn't seem to be impacted by this, but the lack of the "Sources" tab had made debugging near impossible.

I assume there is some different in the structure of the cache between Chromium 111 and Chromium 108? And that the cached files from 108 were causing a crash in the debugger for 111?

Should we be forcibly clearing this cache when updating EO?
eo_support
Posted: Wednesday, June 7, 2023 10:47:02 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Hi,

Sorry about the delay. Yes. This is probably caused by the fact that there have been minor changes to the cache file structure between different browser engines. By default the browser engine cache folder contains version number so this would not occur. However if you set it to a fixed cache path then this can occur. So it does make sense for you to clear the cache.

In the latest build you can clean the cache with this method when your application starts:

https://www.essentialobjects.com/doc/eo.webengine.engine.cleanupcachefolders_overload_1.html

You would pass CacheFolderCleanUpPolicy.OlderVersionOnly. The browser engine will automatically checks whether the contents in the cache folder is from an older version and delete it. If it is from the current version, then it won't delete it.

Hope this helps.

Thanks!
JW
Posted: Wednesday, June 7, 2023 12:02:25 PM
Rank: Advanced Member
Groups: Member

Joined: 2/8/2019
Posts: 57
Thanks for this, we'll add this in.

How early in the "application start up" does this need to go? Do we need to do this prior to doing things like setting the engine options? Or can we leave this until before we set the WebView to load a URI?

eo_support
Posted: Wednesday, June 7, 2023 12:49:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Hi,

You will need to do this before the browser engine is started, which means it will be before you create any WebView. This is because once the browser engine is started, the cache folder is locked and you won't be able to delete it. So for example, if you have a Windows.Form application, you would call it inside your Main method before calling Application.Run(new Form1()) --- assuming that you are using WebView inside "Form1".

So yes, you will need to do things prior or while setting Engine options. You can not leave this until before you set WebView to load a URI.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.