DatL4g / KCEF

Kotlin implementation of jcefmaven with more modern setup and depending on JetBrains/jcef
https://datl4g.github.io/KCEF/
Apache License 2.0
48 stars 8 forks source link

Creatting KCEFClient failing #10

Closed dimaklekchyan closed 8 months ago

dimaklekchyan commented 8 months ago

OS: Mac M1 13.6.4 (22G513) JDK: correto-17.0.10

When i try to create KCEFClient after successful initialization of KCEF an error occurs

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 'void org.cef.browser.CefMessageRouter_N.N_Initialize(org.cef.browser.CefMessageRouter$CefMessageRouterConfig)'
    at org.cef.browser.CefMessageRouter_N.N_Initialize(Native Method)
    at org.cef.browser.CefMessageRouter_N.stateHasChanged(CefMessageRouter_N.java:30)
    at org.cef.CefApp.onInitialization(CefApp.java:213)
    at org.cef.browser.CefMessageRouter_N.<init>(CefMessageRouter_N.java:24)
    at org.cef.browser.CefMessageRouter.create(CefMessageRouter.java:212)
    at org.cef.browser.CefMessageRouter.create(CefMessageRouter.java:197)

It happens due to creating of CefMessageRouter in KCEFClient init block

val router = CefMessageRouter.create(
            CefMessageRouter.CefMessageRouterConfig("cefQueryEvaluate", "cefQueryEvaluateCancel")
)

but CefClient creating without CefMessageRouter finishes successful

How to solve the problem?

nsullivan251 commented 8 months ago

I was just experiencing this same issue. What worked for me was setting the JBR package to the previous release in the KCEF configuration builder.

release("jbr-release-17.0.10b1087.23")

dimaklekchyan commented 8 months ago

@nsullivan251 Thank you! It works @DatL4g Sorry i missed the topic