"Failed to create CEF browser" on OSX with IntelliJ Idea maven-migrated project

24 views
Skip to first unread message

P5music

unread,
Apr 29, 2021, 5:47:15 PM4/29/21
to CodenameOne Discussions
I am using IntelliJ Idea on OSX Catilina for my project (migrated to maven).

I installed the cef folder by means of the command line instruction from the "CEF big changes" web page. The command created a /cef/cef structure.
Running the app in the simulator I got the "unable to create CEF browser" error.

I copied the files to the upper level because I believe the command created a nested cef folder. So now I have .codenameone/cef/files structure
I get
java.lang.IllegalStateException: Settings can only be passed to CEF before createClient is called the first time.
    at org.cef.CefApp.getInstance(CefApp.java:215)
    at com.codename1.impl.javase.cef.BrowserPanel.<init>(BrowserPanel.java:204)
    at com.codename1.impl.javase.cef.CEFBrowserComponent$3.<init>(CEFBrowserComponent.java:249)
    at com.codename1.impl.javase.cef.CEFBrowserComponent.create(CEFBrowserComponent.java:248)
    at com.codename1.impl.javase.cef.CEFBrowserComponent.create(CEFBrowserComponent.java:199)
    at com.codename1.impl.javase.cef.CEFBrowserComponent.create(CEFBrowserComponent.java:196)
    at com.codename1.impl.javase.cef.JavaCEFSEPort.createCEFBrowserComponent(JavaCEFSEPort.java:139)
    at com.codename1.impl.javase.cef.JavaCEFSEPort$2.run(JavaCEFSEPort.java:121)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
0:0:28,21 - Exception: java.lang.RuntimeException - Failed to create CEF browser
java.lang.RuntimeException: Failed to create CEF browser

Thanks in advance

Shai Almog

unread,
Apr 29, 2021, 11:54:19 PM4/29/21
to CodenameOne Discussions
I suggest removing the whole directory then launching Codename One Settings and running the Update command from the menu on the right. It should install CEF correctly for you.

P5music

unread,
Apr 30, 2021, 4:16:31 AM4/30/21
to CodenameOne Discussions
I removed the cef directory, but then it is not recreated from CN1 settings (update, save).
Regards

Steve Hannah

unread,
Apr 30, 2021, 1:35:40 PM4/30/21
to codenameone...@googlegroups.com
This issue was related to Apple's codesigning and notarization requirements, and affected only Big Sur and Catalina.  I have just published a new version 7.0.27 to Maven central which fixes the issue.  This should be generally available within the next few hours.  

Simplest way to update to the new version is to change the cn1.version and cn1.plugin.version properties in your pom.xml file to 7.0.26

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/16801bb6-ae42-4b13-83e2-ce26d6890c21n%40googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

Steve Hannah

unread,
Apr 30, 2021, 1:39:57 PM4/30/21
to codenameone...@googlegroups.com
Sorry... that should read version 7.0.26.  Not 7.0.27



--
Steve Hannah
Web Lite Solutions Corp.
Reply all
Reply to author
Forward
0 new messages