KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
523 stars 69 forks source link

【compose desktop mac】java.lang.ClassNotFoundException: org.cef.CefBrowserSettings #214

Open zkywalker opened 3 months ago

zkywalker commented 3 months ago

平台:compose desktop mac 问题:无法启动浏览器 依赖版本: api("io.github.kevinnzou:compose-webview-multiplatform:1.9.20") 环境版本: kotlin.version=1.9.23 compose.version=1.6.1 日志:

JCEF(31:15:546): initialized stderr logger, severity=LOGSEVERITY_DEFAULT
JCEF_I(31:15:548): CefApp: set state NEW
JCEF_V(31:15:551): Fixed args: [--framework-dir-path=/Users/kun/IdeaProjects/MobiflowMechanic/kcef-bundle/Frameworks/Chromium Embedded Framework.framework, --browser-subprocess-path=/Users/kun/IdeaProjects/MobiflowMechanic/kcef-bundle/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper, --main-bundle-path=/Users/kun/IdeaProjects/MobiflowMechanic/kcef-bundle/Frameworks/jcef Helper.app]
JCEF_I(31:15:553): CefApp: set state INITIALIZING
JCEF_V(31:15:554): Initialize CefApp on Thread[CefInitialize-thread,5,main]
JCEF_V(31:15:836): CefApp: native initialization is finished.
JCEF_I(31:15:836): CefApp: set state INITIALIZED
JCEF_I(31:15:840): version: JCEF Version = 122.1.9.877.f04fabbac3831dbf449a9e363fd040e4d57af082
CEF Version = 122.1.9
Chromium Version = 122.0.6261.94 | settings: browser_subprocess_path=/Users/kun/IdeaProjects/MobiflowMechanic/kcef-bundle/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper, windowless_rendering_enabled=true, command_line_args_disabled=false, cache_path=/Users/kun/IdeaProjects/MobiflowMechanic/cache, persist_session_cookies=false, user_agent=null, user_agent_product=null, locale=null, log_file=null, log_severity=LOGSEVERITY_DEFAULT, javascript_flags=null, resources_dir_path=null, locales_dir_path=null, pack_loading_disabled=false, remote_debugging_port=0, uncaught_exception_stack_size=0, cookieable_schemes_list=null, cookieable_schemes_exclude_defaults=false, no_sandbox=true
JCEF_W(31:15:976): failed to retrieve platform window handle
Exception in thread "AppKit Thread" java.lang.ClassNotFoundException: org.cef.CefBrowserSettings
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
rychuelektryk commented 1 month ago

i'm also struggling with this exception. Help would be much appreciated. i have a windows, kotlin, compose app

K|T00001|36:21.101|New thread: main K|T00001|36:21.106|############################################## 2024-09-29T08:36:21.074552900 ############################################## K|T00047|36:21.446|New thread: AWT-EventQueue-0 K|T00047|36:21.446|application start K|T00047|36:21.734|Window start K|T00047|36:21.754|KoinApplication start K|T00047|36:21.762|DUPA COM ECWB 1 K|T00047|36:21.762|DUPA COM ECWB 7 K|T00047|36:21.763|DUPA COM ECWB 10 K|T00047|36:21.763|DUPA COM ECWB 13 K|T00047|36:21.774|DUPA COM ECWB 14 K|T00047|36:21.782|DUPA COM ECWB 8 K|T00047|36:21.792|DUPA COM ECWB 2 K|T00047|36:21.794|DUPA COM ECWB 6 K|T00048|36:21.831|New thread: DefaultDispatcher-worker-1 K|T00048|36:21.831|JCEF( K|T00048|36:21.831|36:21:830 K|T00048|36:21.831|): initialized stderr logger, severity= K|T00048|36:21.832|LOGSEVERITY_DEFAULT K|T00048|36:21.832|

K|T00048|36:21.832|JCEF_ K|T00048|36:21.832|I K|T00048|36:21.833|( K|T00048|36:21.833|36:21:832 K|T00048|36:21.834| K|T00048|36:21.834|): K|T00048|36:21.834|CefApp: set state NEW K|T00048|36:21.835|

K|T00057|36:21.858|New thread: CefInitialize-thread K|T00057|36:21.858|JCEF_ K|T00057|36:21.859|I K|T00057|36:21.859|( K|T00057|36:21.860|36:21:858 K|T00057|36:21.860| K|T00057|36:21.860|): K|T00057|36:21.860|CefApp: set state INITIALIZING K|T00057|36:21.861|

K|T00057|36:21.861|JCEF_ K|T00057|36:21.861|V K|T00057|36:21.862|( K|T00057|36:21.862|36:21:861 K|T00057|36:21.862| K|T00057|36:21.863|): K|T00057|36:21.863|Initialize CefApp on Thread[#57,CefInitialize-thread,6,main] K|T00057|36:21.863|

K|T00057|36:21.903|JCEF_ K|T00057|36:21.903|V K|T00057|36:21.904|( K|T00057|36:21.904|36:21:902 K|T00057|36:21.904| K|T00057|36:21.904|): K|T00057|36:21.905|CefApp: native initialization is finished. K|T00057|36:21.905|

K|T00057|36:21.905|JCEF_ K|T00057|36:21.906|I K|T00057|36:21.906|( K|T00057|36:21.906|36:21:905 K|T00057|36:21.906| K|T00057|36:21.906|): K|T00057|36:21.907|CefApp: set state INITIALIZED K|T00057|36:21.907|

K|T00057|36:21.908|DUPA COM ECWB 4 K|T00047|36:21.915|DUPA COM ECWB 1 K|T00057|36:21.916|JCEF_ K|T00047|36:21.916|DUPA COM ECWB 7 K|T00057|36:21.916|I K|T00047|36:21.916|DUPA COM ECWB 10 K|T00057|36:21.917|( K|T00047|36:21.917|DUPA COM ECWB 12 K|T00057|36:21.917|36:21:910 K|T00057|36:21.917| K|T00057|36:21.917|): K|T00057|36:21.918|version: JCEF Version = 122.1.9.908.889f87d62a1efba29626772e6f0e95297b419926 CEF Version = 122.1.9 Chromium Version = 122.0.6261.94 | settings: browser_subprocess_path=xxx\kcef-bundle\jcef_helper, windowless_rendering_enabled=true, command_line_args_disabled=false, cache_path=xxx\cache, persist_session_cookies=false, user_agent=null, user_agent_product=null, locale=null, log_file=null, log_severity=LOGSEVERITY_DEFAULT, javascript_flags=null, resources_dir_path=xxx\kcef-bundle, locales_dir_path=xxx\kcef-bundle\locales, pack_loading_disabled=false, remote_debugging_port=0, uncaught_exception_stack_size=0, cookieable_schemes_list=null, cookieable_schemes_exclude_defaults=false, no_sandbox=true K|T00057|36:21.918|

K|T00047|36:21.969|DUPA COM ECWB 14 K|T00047|36:21.982|JCEF_ K|T00047|36:21.983|W K|T00047|36:21.983|( K|T00047|36:21.983|36:21:982 K|T00047|36:21.983| K|T00047|36:21.984|): K|T00047|36:21.984|failed to retrieve platform window handle K|T00047|36:21.984|

Exception in thread "Thread-8"

K|T00071|36:22.170|New thread: Thread-8 K|T00071|36:22.170|java.lang.ClassNotFoundException: org.cef.CefBrowserSettings K|T00071|36:22.171| at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) K|T00071|36:22.171| at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) K|T00071|36:22.172| at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)

ddaeyeonkim commented 1 month ago

I'm having the same issue.
The webview runs, but I want to resolve this error.

> Task :composeApp:run
JCEF(14:49:429): initialized stderr logger, severity=LOGSEVERITY_DEFAULT
JCEF_I(14:49:430): CefApp: set state NEW
JCEF_V(14:49:431): Fixed args: [--framework-dir-path=/Users/dy/develop/DesktopAppPractice/composeApp/kcef-bundle/Frameworks/Chromium Embedded Framework.framework, --browser-subprocess-path=/Users/dy/develop/DesktopAppPractice/composeApp/kcef-bundle/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper, --main-bundle-path=/Users/dy/develop/DesktopAppPractice/composeApp/kcef-bundle/Frameworks/jcef Helper.app]
JCEF_I(14:49:432): CefApp: set state INITIALIZING
JCEF_V(14:49:432): Initialize CefApp on Thread[#42,CefInitialize-thread,5,main]
JCEF_V(14:50:147): CefApp: native initialization is finished.
JCEF_I(14:50:147): CefApp: set state INITIALIZED
JCEF_I(14:50:150): version: JCEF Version = 122.1.9.877.f04fabbac3831dbf449a9e363fd040e4d57af082
CEF Version = 122.1.9
Chromium Version = 122.0.6261.94 | settings: browser_subprocess_path=/Users/dy/develop/DesktopAppPractice/composeApp/kcef-bundle/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper, windowless_rendering_enabled=true, command_line_args_disabled=false, cache_path=/Users/dy/develop/DesktopAppPractice/composeApp/cache, persist_session_cookies=false, user_agent=null, user_agent_product=null, locale=null, log_file=null, log_severity=LOGSEVERITY_DEFAULT, javascript_flags=null, resources_dir_path=null, locales_dir_path=null, pack_loading_disabled=false, remote_debugging_port=0, uncaught_exception_stack_size=0, cookieable_schemes_list=null, cookieable_schemes_exclude_defaults=false, no_sandbox=true
Exception in thread "AppKit Thread" java.lang.ClassNotFoundException: org.cef.CefBrowserSettings
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
rychuelektryk commented 1 month ago

I'm having the same issue. The webview runs, but I want to resolve this error.

> Task :composeApp:run
JCEF(14:49:429): initialized stderr logger, severity=LOGSEVERITY_DEFAULT
JCEF_I(14:49:430): CefApp: set state NEW
JCEF_V(14:49:431): Fixed args: [--framework-dir-path=/Users/dy/develop/DesktopAppPractice/composeApp/kcef-bundle/Frameworks/Chromium Embedded Framework.framework, --browser-subprocess-path=/Users/dy/develop/DesktopAppPractice/composeApp/kcef-bundle/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper, --main-bundle-path=/Users/dy/develop/DesktopAppPractice/composeApp/kcef-bundle/Frameworks/jcef Helper.app]
JCEF_I(14:49:432): CefApp: set state INITIALIZING
JCEF_V(14:49:432): Initialize CefApp on Thread[#42,CefInitialize-thread,5,main]
JCEF_V(14:50:147): CefApp: native initialization is finished.
JCEF_I(14:50:147): CefApp: set state INITIALIZED
JCEF_I(14:50:150): version: JCEF Version = 122.1.9.877.f04fabbac3831dbf449a9e363fd040e4d57af082
CEF Version = 122.1.9
Chromium Version = 122.0.6261.94 | settings: browser_subprocess_path=/Users/dy/develop/DesktopAppPractice/composeApp/kcef-bundle/Frameworks/jcef Helper.app/Contents/MacOS/jcef Helper, windowless_rendering_enabled=true, command_line_args_disabled=false, cache_path=/Users/dy/develop/DesktopAppPractice/composeApp/cache, persist_session_cookies=false, user_agent=null, user_agent_product=null, locale=null, log_file=null, log_severity=LOGSEVERITY_DEFAULT, javascript_flags=null, resources_dir_path=null, locales_dir_path=null, pack_loading_disabled=false, remote_debugging_port=0, uncaught_exception_stack_size=0, cookieable_schemes_list=null, cookieable_schemes_exclude_defaults=false, no_sandbox=true
Exception in thread "AppKit Thread" java.lang.ClassNotFoundException: org.cef.CefBrowserSettings
  at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
  at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
  at java.base/java.lang.ClassLoader.loadClass(Unknown Source)

Hi, i dont remember correctly, but i think that the problem stopped when i downgraded java to 17. In the end i switched to using cef directly in my windows app