Page 3 of 3

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Tue Nov 13, 2018 7:48 am
by charles
For testing purposes I compiled a few previous versions of the app that used to work. The earliest I tested was Chrome 59 (mid 2017), and they all seem to suffer from the same issue. No OnPaint callbacks are being returned anymore on Mojave.

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Tue Nov 13, 2018 11:34 am
by simonpearce
CefClient on the latest CEF (Chrome 70) works and renders to OpenGL when run with the --off-screen-rendering-enabled so what is it doing that we're not?

I mentioned I'd diff'd the CefClient source between Chrome 65 and Chrome 70 and pulled in relevant (AFAIK) changes.

Maybe it's something that's been in the CefClient source for a long time that allows it to work on Mojave?

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Tue Nov 13, 2018 12:07 pm
by simonpearce
FWIW, I also built CefClient locally on my Mojave 10.14 & Xcode 10.1 system and it appeared to work. Some slight rendering oddities when resizing the client window but mostly works as expected with off-screen rendering enabled.

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Wed Dec 05, 2018 9:24 am
by michael
Hello everyone,

I pretty much have the same problem right now. OSR with Xcode 10.1 and macOS Mojave.
After updating CEF I updated my app with library linking and everything so it compiles and doesn't crash.

My app did run also for a while now, with regular CEF updates. And now the last remaining problem seems to be that OnPaint isn't called anymore.
cefclient with OSR works but I can't figure out why my app isn't working anymore.

Does anyone have more insight by now?

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Fri Jan 04, 2019 1:45 pm
by BronzeBeard
Little bit of necro posting, but I figured this might help a few people. I use OS X 10.12, and Xcode 9. I also had issues OnPaint() not being called and no errors in the logs or terminals. I came to find out that system log messages are in Utilities/Console.app and are not spit out into the terminal when running your program. In my example, the helper program's code signature was being marked as invalid and the kernel was not allowing the helper to run properly. Of course, none of this was in the terminal... I also come to find out that Code Signature system has greatly changed in Xcode 9 and on. I created a new Xcode project to generate my helper as a cli program, and thus not require code signature and now it works fine.

This may or may not be valid for Mojave, but you never know.

Re: CEF application on macOS 10.14 (Mojave)

PostPosted: Tue Jan 08, 2019 9:54 am
by michael
So I invested a few more hours and for me the fix was to add

Code: Select all
#if !defined(CEF_USE_SANDBOX)
    settings.no_sandbox = true;
#endif


to the CefSettings.

I noticed that I could use the cefclient_Helper from the CEF build and OnPaint would be called. But only if sandbox is activated. I had disabled sandboxing for now. The thing is you also have to tell that your CefSettings when initializing CEF…