Reusing helper process on Mac

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Reusing helper process on Mac

Postby rado » Tue Oct 10, 2017 1:05 pm

I want to port my application to Mac. My main application opens the visible browser window for UI and I need it to create multiple hidden browsers for background work. Can I use the "Helper" application as background web process? I've sent special parameter to helper app so it knows it is called ad background worker, it that case it makes CefInitialize, CreateBrowser, etc. but I cannot get it working.
First I'm trying to start it from console using
Code: Select all
open  -W -g -n "/path/myapp Helper.app" --args -myapp=1
but I get errorL LSOpenURLsWithRole() failed with error -10810 ..... I cannot find reasonable answer what could be wrong on google.

When I try to start it directly
Code: Select all
/path/myapp Helper.app/Contents/MacOS/myapp Helper -myapp=1
empty windows is opened, and in console I'll get error browser_gpu_channel_host_factory.cc - Failed to launch GPU process.

Any idea what could be wrong or is this even possible? Thank you
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am

Re: Reusing helper process on Mac

Postby magreenblatt » Tue Oct 10, 2017 1:18 pm

Helper processes are launched by Chromium when needed. Why are you trying to run the helper directly?
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: Reusing helper process on Mac

Postby rado » Tue Oct 10, 2017 1:37 pm

I need invisible background browser with no icon in dock panel so I guess I cannot use the main application process for this and I didn't want to have application consisting of four bundles
Code: Select all
main.app
main Helper.app
worker.app
worker Helper.app

it looks little bit insane for relatively simple application :)
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am

Re: Reusing helper process on Mac

Postby magreenblatt » Tue Oct 10, 2017 2:26 pm

Do the background/hidden browsers need to be a separate app instance from the visible browser? Why not just create multiple browsers, some hidden and some visible, using a single app instance?
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: Reusing helper process on Mac

Postby rado » Tue Oct 10, 2017 2:46 pm

The hidden browser can be in the same process (in Windows version there is only one process) but I'm new to mac also as user so somehow I've thought that hidden browsers would be visible in the dock panel and I'd need to use separate process. I'll use the main application, thank you!
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 43 guests