Skip to content
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

Cannot start more than one browser processus since CEF 121 #484

Open
apique13 opened this issue Sep 27, 2024 · 1 comment
Open

Cannot start more than one browser processus since CEF 121 #484

apique13 opened this issue Sep 27, 2024 · 1 comment
Labels
bug Bug report

Comments

@apique13
Copy link
Contributor

Describe the bug
Cannot start more than one browser processus since CEF 121 (cefsharp/CefSharp#4668)
I understood it is because of the CefSettings.root_cache_path parameter, but what is the good solution to manage it ?
The only workaround possible should be to define a random root_cache_path for each instance, but it is a bit dirty.

To Reproduce
Launch run.bat to start the demo browser.
Launch it twice, The second browser will hang.

Expected behavior
A clear and concise description of what you expected to happen and what happened instead.

Screenshots
image

Versions (please complete the following information):

  • Windows 11
  • OpenJDK 11
    JCEF Version = 127.3.1.329
    CEF Version = 127.3.1
    Chromium Version = 127.0.6533.100

** Logs **
java -cp "./bin;./bin/*" -Djava.library.path=./bin/lib/win64 tests.detailed.MainFrame
Offscreen rendering disabled
Using:
JCEF Version = 127.3.1.329
CEF Version = 127.3.1
Chromium Version = 127.0.6533.100
AppHandler.stateHasChanged: INITIALIZING
initialize on Thread[AWT-EventQueue-0,6,main] with library path ./bin/lib/win64
[0927/184404.913:WARNING:alloy_main_delegate.cc(559)] Alloy bootstrap is deprecated and will be removed in ~M127. See chromiumembedded/cef#3685
Added scheme search://
Added scheme client://
[0927/184404.917:WARNING:resource_util.cc(99)] Please customize CefSettings.root_cache_path for your application. Use of the default value may lead to unintended process singleton behavior.
Opening in existing browser session.
AppHandler.stateHasChanged: INITIALIZATION_FAILED
[0927/184404.934:WARNING:task_impl.cc(19)] No task runner for threadId 0
[0927/184404.935:WARNING:task_impl.cc(31)] No task runner for threadId 0
[0927/184404.935:WARNING:task_impl.cc(19)] No task runner for threadId 0
[0927/184404.935:WARNING:task_impl.cc(31)] No task runner for threadId 0
[0927/184405.253:WARNING:task_impl.cc(19)] No task runner for threadId 0
[0927/184405.253:WARNING:task_impl.cc(31)] No task runner for threadId 0
[0927/184405.357:WARNING:task_impl.cc(19)] No task runner for threadId 0
[0927/184405.360:WARNING:task_impl.cc(31)] No task runner for threadId 0
[0927/184405.463:WARNING:task_impl.cc(19)] No task runner for threadId 0
[0927/184405.463:WARNING:task_impl.cc(31)] No task runner for threadId 0
[0927/184405.569:WARNING:task_impl.cc(19)] No task runner for threadId 0

@apique13 apique13 added the bug Bug report label Sep 27, 2024
@nrmnrm
Copy link

nrmnrm commented Sep 30, 2024

This is actually expected behaviour, each browser process needs its own root cache folder now, use something like this:

CefSettings settings = new CefSettings();
Path tmpDir = Files.createTempDirectory("dc-");
tmpDir.toFile().deleteOnExit();
settings.root_cache_path = tmpDir.toString();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

2 participants