-
Notifications
You must be signed in to change notification settings - Fork 69
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CefSettings.root_cache_path (5.9) #1242
Comments
//The location where cache data will be stored on disk. If empty an in-memory cache will be used for some features and a temporary disk cache for others.
//HTML5 databases such as localStorage will only persist across sessions if a cache path is specified.
settings.RootCachePath = Path.GetFullPath("cache");
//If non-null then CachePath must be equal to or a child of RootCachePath
//We're using a sub folder.
//
settings.CachePath = Path.GetFullPath("cache\\global"); |
I don't know enough about this to even attempt theorizing a possible fix. Even if I knew where to set the proper value, I wouldn't know what the proper value was. I don't see it being set in any editable file in the build directory:
|
I don't have a clue how to handle this. I tried again for a good while just now. I found quite a few places where people advised going by this: https://github.com/cefsharp/CefSharp/blob/v130.1.90/CefSharp.Example/CefExample.cs Looking at that makes me even more confused. This is over my head. I don't even know what to begin to do with that example. |
The root cache path has to be set somewhere already, because localStorage is persistent already, and the CEF docs say localStorage will not be persistent without this set. ...but I added code to set it anyway, and I still get the same error after modifying this part of PlayerHTML.vb (and the settings definitely take effect, but I'm 99% sure the only change is that it puts the files in the folder I specify rather than a Windows user app directory or something): settings.RegisterScheme(resScheme)
settings.RootCachePath = My.Application.Info.DirectoryPath() & "\cache\global"
Cef.Initialize(settings) I open one instance of Quest and load a game in the player. Then, while that game is running in the player, I open a second instance of Quest and load a second game in that player. These lines appear in the log when starting the second game in the player:
At this point, an actual Chrome window is opened. I believe it finds that its browser is already busy (or that it failed to initialize), and it tries to run the second game in Chrome. (Just a wild theory.) cefsharp/CefSharp#4668 (comment) This seems to be saying this should have never worked, and that a previous update to CEF "fixes" everything by stopping it from trying to work at all. |
Well, this is most probably bad practice, but this allows two games at once: settings.RootCachePath = Path.GetTempPath() & "\quest5-cache" + (Convert.ToInt32((DateTime.Now - (New DateTime(2012, 1, 1))).TotalSeconds)).ToString() During play, each game has its own localStorage (of course), but that localStorage is rendered inaccessible once the game is closed this way. I also assume this will fill the temp directory up before too long, haha. I wonder if the game directory can be accessed at this point in this script... Then, each game could have its own persistent localStorage. Since I have commented so many times here, I am converting this to a Discussion, and an issue without all these comments will be created in this issue's place. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
https://discord.com/channels/1278365322054996018/1310990109797253141
Attempting to play more than one game using multiple instances of the 5.9 desktop build throws an error.
log message:
The text was updated successfully, but these errors were encountered: