Page 1 of 3

CEF application on macOS 10.14 (Mojave)

PostPosted: Thu Nov 08, 2018 3:08 pm
by simonpearce
The CEF application I wrote worked correctly using CEF 3359/Mac 64bit when I was using macOS 10.12. I have now updated to macOS 10.14 and CEF 3538 and the application no longer starts. No obvious error messages in the console or logs and we are not macOS developers so I don't know where to start looking.

Is there a post or guide about what might have changed and updates I need to add to my code?

[Simon]

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Thu Nov 08, 2018 3:21 pm
by magreenblatt
You can compare the cefclient sample application code between versions to see what's changed.

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Thu Nov 08, 2018 3:26 pm
by magreenblatt
Here's a comparison view for the branches that you're interested in (scroll down for files under the tests/cefclient directory): https://github.com/chromiumembedded/cef ... 359...3538

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Thu Nov 08, 2018 3:28 pm
by magreenblatt
This is likely the change that's causing you difficulties: https://bitbucket.org/chromiumembedded/ ... cv2sandbox

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Thu Nov 08, 2018 3:51 pm
by simonpearce
I was in the process of diffing the 2 source trees from each revision but the pointer to the MacV2Sandbox looks very relevant.

I am not using the CEF sandbox in my application though - are the bits of that document that refer to sandbox still relevant?

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Thu Nov 08, 2018 3:58 pm
by magreenblatt
simonpearce wrote:I am not using the CEF sandbox in my application though - are the bits of that document that refer to sandbox still relevant?

Are you setting CefSettings.no_sandbox = true? If not, you're getting the sandbox by default. Also, the structural changes (linking/loading the CEF framework) still apply.

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Thu Nov 08, 2018 4:04 pm
by simonpearce
magreenblatt wrote:Are you setting CefSettings.no_sandbox = true? If not, you're getting the sandbox by default


Yes I am. Sounds like I just need to concern myself with the structural/loading issues then.

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Mon Nov 12, 2018 4:48 pm
by simonpearce
I made the changes to the code both in the main application and the helper app but nothing is rendered since my overridden OnPaint() method is no longer called.

Are you aware of any changes post CEF 3.3359 that would cause that to happen and need me to change my code?

(I differ the CEF sample application between the working and non-working versions and applied any changes that looked important)

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Mon Nov 12, 2018 4:55 pm
by magreenblatt
Oh, you’re using off-screen rendering. Do you have GPU enabled or disabled? Are you setting CefSettings.windowless_rendering_enabled? You might want to also test with cefclient to make sure it’s working there.

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Mon Nov 12, 2018 5:21 pm
by simonpearce
The disable-gpu and disable-gpu-compositing command line flags are in place and CefSettings.windowless_rendering_enabled is set to true.

This application has been working as is for years - I thought it was maybe a change to Xcode 10.1 and Mojave that introduced the problem but building the old version with CEF 3.3359 worked as expected.

./cefclient --off-scren-rendering-enabled seems to work as expected although the "spin" option doesn't seem to be present on macOS so it's hard to tell if it's really using OpenGL or not.

I do see the same warning/error in the log when cefclient starts as I see in my application "[1112/141845.928716:ERROR:gpu_process_transport_factory.cc(990)] Lost UI shared context." so I take it that's not important for the moment at least.

Any verbose logging options in CEF I can turn on to see if that tells me anything ?