electron-edge-js: "App threw an error during load" with latest electron 4.0.0 and electron-edge-js 10.11.0

Hey there,

upgraded to electron 3.0.13 and electron-edge-js 10.11.0 lately and everything was running fine (app could be build, started and .Net integration was working).

After the stable release of electron 4.0.0 I now tried to upgrade it but my electron app fails on start with the following error:

 App threw an error during load
Error: The specified procedure could not be found.
\\?\C:\Users\...\dist\node_modules\electron-edge-js\lib\native\win32\x64\10.11.0\edge_nativeclr.node
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:722:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:160:31)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Users\...\dist\node_modules\electron-edge-js\lib\edge.js:59:10)
    at Object.<anonymous> (C:\Users\...\dist\node_modules\electron-edge-js\lib\edge.js:188:3)
error: Uncaught exception:  Error: The specified procedure could not be found.
\\?\C:\Users\...\dist\node_modules\electron-edge-js\lib\native\win32\x64\10.11.0\edge_nativeclr.node
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:722:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:160:31)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Users\...\dist\node_modules\electron-edge-js\lib\edge.js:59:10)
    at Object.<anonymous> (C:\Users\...\dist\node_modules\electron-edge-js\lib\edge.js:188:3)

I already tried a clean install by removing the node_module folders.

Here on github it looks like electron-edge-js should already be ready for electron 4.x.x releases but seems its not or do I miss something in my setup?

best regards Max

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Also experiencing the same issue. Electron 4.0.0 Node 10.11.0.

OK, the solution seems very simple:

  • in the binding.gyp file ‘win_delay_load_hook’ should be ‘true’
  • the problematic win_delay_load_hook.cc file should looks like this (added #pragma unmanaged):
#pragma unmanaged
static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
  HMODULE m;
  if (event != dliNotePreLoadLibrary)
    return NULL;

  if (_stricmp(info->szDll, "iojs.exe") != 0 &&
      _stricmp(info->szDll, "node.exe") != 0)
    return NULL;

  m = GetModuleHandle(NULL);
  return (FARPROC) m;
}

#pragma unmanaged
decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = load_exe_hook;