[Mac]helper process crash

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.

[Mac]helper process crash

Postby hachiko » Wed Aug 25, 2021 4:43 am

I want to integrate CEF3 into a sandboxed app.
Here is the app structure.
appstru.png
appstru.png (39.86 KiB) Viewed 2349 times


The Helper Apps are all the same except the name, and the entitlements show as below.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>com.apple.security.app-sandbox</key>
   <true/>
   <key>com.apple.security.inherit</key>
   <true/>
</dict>
</plist>


The entitlements is required by macOS sandbox policy. But when I ran the main app, errors occurred.
Code: Select all
Aug 25 17:37:55  WWUIMac Helper (GPU)[66459] <Error>: SeatbeltExecServer: Failed to initialize sandbox: -1 Operation not permitted
Failed to initialize the sandbox.
[0825/173755.753749:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=256
[0825/173755.753794:WARNING:gpu_process_host.cc(1308)] The GPU process has crashed 4 time(s)


Here is the log. I have searched a lot of relative reports, the problems was still.
What is the problem ?

Mentioned : I use the main function in sample application code for both browser application and helper application. Helper has linked cef_sandbox.a.
Branch 4515 was used
hachiko
Newbie
 
Posts: 4
Joined: Wed Aug 25, 2021 4:23 am

Re: [Mac]helper process crash

Postby magreenblatt » Wed Aug 25, 2021 4:03 pm

What CEF version? Compare your app setup to the CEF sample apps. If you're upgrading from an older CEF version review the mac-related announcements here.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: [Mac]helper process crash

Postby hachiko » Thu Aug 26, 2021 2:59 am

I used recent release 4515 version.
I am a new developer on CEF, which means I haven't used the previous cef version and starting from 4515.
Since yesterday, I have built the chromium embedded framework and cef_sandbox.a from source code. I noticed the error came from the function[sandbox_init_with_parameters] supported by Apple.
But the error code and error message is useless.
Code: Select all

int sandbox_init_with_parameters(const char* profile,
                                 uint64_t flags,
                                 const char* const parameters[],
                                 char** errorbuf);

Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  FILTER_SYSCALLS_DEBUG : FALSE
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  BROWSER_PID : 31145
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  USER_HOMEDIR_AS_LITERAL : /Users/hachiliu/Library/Containers/com.tencent.wework.WWUIMac/Data
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  OS_VERSION : 1105
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  DISABLE_SANDBOX_DENIAL_LOGGING : TRUE
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  FILTER_SYSCALLS : FALSE
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  BUNDLE_ID : 88L2Q4487U.com.tencent.wework.WWUIMac
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  DARWIN_USER_DIR : /private/var/folders/bn/l98lmtf95_55f101n27qm0m00000gn/0/com.tencent.wework.WWUIMac
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  ENABLE_LOGGING : FALSE
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  DISABLE_METAL_SHADER_CACHE : FALSE
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  DARWIN_USER_TEMP_DIR : /private/var/folders/bn/l98lmtf95_55f101n27qm0m00000gn/T/com.tencent.wework.WWUIMac
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  DARWIN_USER_CACHE_DIR : /private/var/folders/bn/l98lmtf95_55f101n27qm0m00000gn/C/com.tencent.wework.WWUIMac
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  LOG_FILE_PATH :
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: policy_params  BUNDLE_PATH : /Volumes/T7/DerivedData/WWUIMac-brxcoijgekxradgzgezahgersbua/Build/Products/Debug/WWUIMac.app
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: extra_params  CURRENT_PID : 31216
Aug 26 15:42:21  WWUIMac Helper (GPU)[31216] <Error>: extra_params  EXECUTABLE_PATH : /Volumes/T7/DerivedData/WWUIMac-brxcoijgekxradgzgezahgersbua/Build/Products/Debug/WWUIMac.app/Contents/Frameworks/WWUIMac Helper(GPU).app/Contents/MacOS/WWUIMac Helper (GPU)


The profile parameter looks like a standard format string, while the parameters seems to passing important info. So I print the paramters, nothing is strange.
hachiko
Newbie
 
Posts: 4
Joined: Wed Aug 25, 2021 4:23 am

Re: [Mac]helper process crash

Postby hachiko » Thu Aug 26, 2021 3:58 am

Besides, I open sandbox on main process which is required by Apple Store.
hachiko
Newbie
 
Posts: 4
Joined: Wed Aug 25, 2021 4:23 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 27 guests