glawson/electron-deeplink

Mach rendezvous failed, terminating process

addlistener opened this issue · 3 comments

image

The error message

[42710:0725/145216.465260:ERROR:network_service_instance_impl.cc(470)] Network service crashed, restarting service.
[42744:0725/145217.047658:ERROR:mach_port_rendezvous.cc(310)] bootstrap_look_up com.deeplink.dev-app.MachPortRendezvousServer.42710: Permission denied (1100)
[42745:0725/145217.091441:ERROR:mach_port_rendezvous.cc(310)] bootstrap_look_up com.deeplink.dev-app.MachPortRendezvousServer.42710: Permission denied (1100)
[42746:0725/145217.091641:ERROR:mach_port_rendezvous.cc(310)] bootstrap_look_up com.deeplink.dev-app.MachPortRendezvousServer.42710: Permission denied (1100)
[42745:0725/145217.092619:ERROR:child_thread_impl.cc(226)] Mach rendezvous failed, terminating process (parent died?)
[42746:0725/145217.093284:ERROR:child_thread_impl.cc(226)] Mach rendezvous failed, terminating process (parent died?)
[42710:0725/145217.095197:ERROR:network_service_instance_impl.cc(470)] Network service crashed, restarting service.
objc[42744]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x7ffa5d906318) and /Users/jchnxu/hacking/outline/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x110c4bce0). One of the two will be used. Which one is undefined.
[42744:0725/145217.371350:ERROR:child_thread_impl.cc(226)] Mach rendezvous failed, terminating process (parent died?)
[42749:0725/145217.596561:ERROR:mach_port_rendezvous.cc(310)] bootstrap_look_up com.deeplink.dev-app.MachPortRendezvousServer.42710: Permission denied (1100)
[42749:0725/145217.597434:ERROR:child_thread_impl.cc(226)] Mach rendezvous failed, terminating process (parent died?)
[42710:0725/145217.599879:ERROR:network_service_instance_impl.cc(470)] Network service crashed, restarting service.
[42751:0725/145217.898777:ERROR:mach_port_rendezvous.cc(310)] bootstrap_look_up com.deeplink.dev-app.MachPortRendezvousServer.42710: Permission denied (1100)
[42754:0725/145218.144274:ERROR:mach_port_rendezvous.cc(310)] bootstrap_look_up com.deeplink.dev-app.MachPortRendezvousServer.42710: Permission denied (1100)

The code

const createWindow = () => {
  // Create the browser window.
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    // webPreferences: {
    //   preload: path.join(__dirname, 'preload.js')
    // }
  })

  const isDev = true;
  const protocol = isDev ? 'dev-app' : 'prod-app';
  const { Deeplink } = require('electron-deeplink');
  const deeplink = new Deeplink({ app, mainWindow, protocol, isDev });

  deeplink.on('received', (link) => {
    console.log(link);
  });

  // mainWindow.loadFile('build/app/index.html')
  mainWindow.loadURL('http://localhost:3000');

  mainWindow.webContents.openDevTools()
}
sifex commented

To be a little more specific, this is a function of opening devtools, and could somewhat be related to electron/electron#33149

Sorry for digging it out but I wanted to leave a solution in case anyone finds the same issue.

I've updated the readme of my package with instructions on how to fix this issue: https://github.com/witcher112/electron-app-universal-protocol-client#macos-development-mode-permissions-issue

Since the issue is caused by the macOS permissions system, I think it should also work for anyone sticking with electron-deeplink package as well.