Giter Club home page Giter Club logo

electron-edge's Introduction

Hi! I'm Chanwoong Kim

GitHub followers LinkedIn Static Badge

playing games with my wife

Résumé

🐈‍⬛ 🤔 🎉 🫠

electron-edge's People

Contributors

alexbeletsky avatar anaisbetts avatar bbaia avatar bmavity avatar dahlbyk avatar dbaeumer avatar dpen2000 avatar dthorpe avatar fredrikl avatar gaelazzo avatar israelg99 avatar jchannon avatar jonmills avatar jskrzypek avatar kexplo avatar kjpou1 avatar lstratman avatar moodmosaic avatar paulprins avatar petermortensen avatar pgermishuys avatar porsager avatar rstuven avatar seedyoon avatar sheepwillprevail avatar smoothdeveloper avatar squallatf avatar srobati avatar tjanczuk avatar tomlm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron-edge's Issues

Unable to access the CLR method to wrap through reflection

i want use electron edge but i received this error
Uncaught System.InvalidOperationException: Unable to access the CLR method to wrap through reflection. Make sure it is a public instance method.
my .net code:

namespace electron_factorial
{
    public class MyMath
    {
        public int Factorial(int number)
        {
            if (number < 2)
                return number;
            return Factorial(number - 1)*number;
        }

        public Task<object> CalcFactorial(object obj)
        {
            return Task.Factory.StartNew(() => Factorial((int) obj) as object);
        }
    }
}

my js code:

    <script>
  function  myFunction()
    {
      var {remote}=require("electron");
      var edge = require('electron-edge');
      var CalcFactorial = edge.func({
           assemblyFile: 'electron-factorial.dll',
           typeName: 'electron_factorial.MyMath',
           methodName: "ClacFactorial"
      });

      document.getElementById("calc").addEventListener("click", function (e) {
           var inputText = document.getElementById("txtnumber").value;
           CalcFactorial(inputText, function (error, result) {
                document.getElementById("factorial").innerHTML = result;
           });
      });
    }

    </script>

Error: Module version mismatch

Hi, Is not working with insert in electron main.js. pls check. I am using the current versions of this libraries
main.js:

const electron = require('electron')
const edge = require('electron-edge')

shell:

App threw an error during load
Error: Module version mismatch. Expected 49, got 48.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:167:20)
    at Object.Module._extensions..node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:167:20)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/fabionunes/Developer/playground/electron-finger/node_modules/electron-edge/lib/edge.js:50:8)

electron.exe.config not working as expected

On a windows machine I have an app.config in C# which belongs to runner.exe (example program) that loads my assembly.dll.
After compilation I get runner.exe.config (derived from the app.config).
I would like electron to call my assembly.dll but i'm not able to add the app.config (calling and running methods in the assembly which don't need a configuration work as expected).
I tried electron.exe.config, I tried node.dll.config (which I assumed was called from the electron.exe).
Another thing is that there are 2 electron.exe processes running, one spawned by the other and i'm not sure if they read the config.
Any help is appreciated.

problem with electron 1.3.3 release

Hi, the edge is not working with electron 1.3.3 release. 1.3.2 is ok. pls check.

Error: The specified procedure could not be found.
?\node_modules\electron-edge\lib\native\win32\ia32\6.1.0\edge_nativeclr.node
at Error (native)
at process.module.(anonymous function) as dlopen
at Object.Module._extensions..node (module.js:568:18)
at Object.module.(anonymous function) as .node
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (node_modules\electron-edge\lib\edge.js:46:8)
Thanks

Getting a 404: /x64/ path segment is now /win-x64/

OOPS! This is the wrong repository. Chock it up to having too many browser tabs opened.

When I attempt to install this version of node, I get a 404:

D:\VS> nvmw install v5.1.1
Start installing node/v5.1.1 (x64) to C:\Users\ccraig\.nvmw\v5.1.1
Download from https://nodejs.org/dist/v5.1.1/x64/node.exe, and save it as C:\Users\ccraig\.nvmw\v5.1.1\node.exe
404 Not Found
Download C:\Users\ccraig\.nvmw\v5.1.1\node.exe from https://nodejs.org/dist/v5.1.1/x64/node.exe failed

This version exists at
https://nodejs.org/dist/v5.1.1/win-x64/node.exe

rather than at
https://nodejs.org/dist/v5.1.1/x64/node.exe

Support for .NET Core 2.0

Is .NET Core 2.0 supported under Linux? I tried a hello world example, but it gave me a CoreCLR initialization error.

index.js looks like this:

var edge = require('electron-edge');

var helloWorld = edge.func(`
    async (input) => { 
        return ".NET Welcomes " + input.ToString(); 
    }
`);

helloWorld('JavaScript', function (error, result) {
    if (error) throw error;
    console.log(result);
});

Trying to run it produces the following output:

$ node_modules/.bin/electron index.js 
CoreClrEmbedding::Initialize - Failed to initialize CoreCLR, HRESULT: 0x80070057
App threw an error during load
TypeError: edge.initializeClrFunc is not a function
    at Object.exports.func (/home/theowl/projects/work/dotnet/testapp/node_modules/electron-edge/lib/edge.js:169:17)
    at Object.<anonymous> (/home/theowl/projects/work/dotnet/testapp/index.js:3:23)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at loadApplicationPackage (/home/theowl/projects/work/dotnet/testapp/node_modules/electron/dist/resources/default_app.asar/main.js:280:12)
    at Object.<anonymous> (/home/theowl/projects/work/dotnet/testapp/node_modules/electron/dist/resources/default_app.asar/main.js:322:5)
    at Module._compile (module.js:571:32)
/home/theowl/projects/work/dotnet/testapp/node_modules/electron/dist/resources/default_app.asar/main.js:6068: Uncaught TypeError: edge.initializeClrFunc is not a function

Electron: v1.5.0
Node.js: v7.4.0
.NET Core: v2.0.0
OS: Fedora 26

Ability to execute electron code from within C# app

I am attempting to launch an Electron app from within a C# app. The reason for this is that we have two applications, with a lot of code. The first is the "controlling" application, written in C# and the second is the "rendering" application which is written in Electron.

Is this supported? I can't find any examples, and i'm not seeing references to electron in the code, so i'm guessing it is not supported.

By the way, I suppose I should also mention that I wrote a small test app that attempts to launch the electron sample app (https://github.com/electron/electron-quick-start) via a test C# app, which was unsuccessful.

Here is the test C# idea:

        var func = Edge.Func(@"
          var electron = require('electron');
          return function (data, cb) {
            var init = !!electron.app;
            if (!init) console.log('Could not initialize electron app!');
            cb(null, init);
          };
        ");

        dynamic init = await func(null);
        Console.WriteLine("Initialized Electron: " + init);

The code runs fine. It's just not able to initialize the electron.app.

Unloading of native modules during electron app update

I am facing problems with electron-edge when the electron app which contains electron-edge is updated via electron-builder nsis update mechanism (same problem occured with squirrel update before as well).

electron: =1.4.4
electron-edge: @electron_v1.4.4

What seems to happen, is that the update process terminates the electron-app, deletes old install directory (appname/0.9.0-beta.1), installs to new install directory (appname/0.9.0-beta.2) and starts the app again.
At this point the importing/requiring of electron-edge fails as node-require still looks for electron-edge in the old install directory which is not existing anymore.

could not load edge module: Cannot find module 'C:/Users/username/AppData/Local/Programs/appname/0.9.0-beta.1/resources/app.asar/node_modules/electron-edge/lib/native/win32/x64/6.5.0/edge_nativeclr

Did you experience this problem before and is the assumption that the problem originates from node not being able to unload/clear cache of native modules ( nodejs/node#6160 ) correct? Any way to work around this limitation?

musl libc: error: 'timeval'

Greetings,

On Void-linux musl-x86_64 when trying to npm install electron-edge-js I am getting the following error:

./src/CoreCLREmbedding/json/casablanca/include/cpprest/asyncrt_utils.h:496:47: error: 'timeval' does not name a type; did you mean 'timegm'?
static datetime timeval_to_datetime(const timeval &time);
^~~~~~~
timegm`

the same issue exists on edge too: tjanczuk#612

showing error: "fs.existsSync" is not a function

Hi,
I am running electron-edge for calling method from C# DLL in nodejs. while including electron-edge i am getting this error : "fs.existsSync" is not a function

declare var require: any
var edge = require('electron-edge');
var newapi= edge.func({
assemblyFile: 'C#.dll',
typeName: 'abc.def',
methodName: 'C#api'
});

i am using ionic and electron.

can you please guide me to solve this error. i am totally new to web-technologies.

Thanks,
Kamlesh Khatvani

'npm install electron-edge' fails on CentOS and NetCore SDK 1.0.1

Hi! I'm getting some problems when installing my dependencies when I bring over my application to linux. I'm also getting problems when running the application (module compiled against a different Node.js version using 48, requires 53), but I think this is the root cause.

This is installed on CentOS 7.3, using Node 6.10 from EPEL, and dotnet-dev-centos-x64.1.0.1.tar.gz from microsoft.
Mono is not installed, although it has the same results.

The following was performed when no node_modules folder is present.
dependencies in package.json:
"electron": "^1.4.x",
"electron-debug": "^1.1.0",
"electron-edge": "^6.5.4",
"node-gyp": "^3.5.0",

Sample output:
[devel@CentOS7 electron-linux]$ npm install electron-edge

[email protected] install /home/devel/Desktop/electron-linux/node_modules/edge-cs
node tools/install.js

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

[email protected] install /home/devel/Desktop/electron-linux/node_modules/electron-edge
node tools/install.js

make: Entering directory `/home/devel/Desktop/electron-linux/node_modules/electron-edge/build'
TOUCH Release/obj.target/edge_nativeclr.stamp
CXX(target) Release/obj.target/edge_coreclr/src/common/v8synchronizationcontext.o

*** SNIP - MORE COMPILING ***

CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/pal/pal.unix.o
SOLINK_MODULE(target) Release/obj.target/edge_coreclr.node
COPY Release/edge_coreclr.node
ACTION binding_gyp_build_managed_target_restore_bootstrap_packages lib/bootstrap/project.lock.json
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
make: *** [lib/bootstrap/project.lock.json] Error 1
make: Leaving directory /home/devel/Desktop/electron-linux/node_modules/electron-edge/build' gyp ERR! build error gyp ERR! stack Error: make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.10.0-514.16.1.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/devel/Desktop/electron-linux/node_modules/electron-edge
gyp ERR! node -v v6.10.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
electron-linux-project /home/devel/Desktop/electron-linux
└─┬ [email protected]
├── [email protected]
└── [email protected]

[devel@CentOS7 electron-linux]$

Memory leak when passing byte[] from .NET to V8

Hi, I'm having some memory leak issues due to byte[] being copied when passing it back. For now I'm directly calling the GC to cleanup but I was wondering if there's any good solution for this (you can clearly see the memory usage going up and then drop when the GC is called upon).

There is (or was) some concern about something related in this issue over at edge's github.

Error: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))

I admit that this issue may sound a duplicate of issue tjanczuk#496, but I cannot overcome the problem. I guess either a point is missing in the documentation of edge / electron-edge or something is not clear to me.

I create a super simple C# library in .Net Core 1.1 with .Net Standard 1.6. I finished dotnet restore, dotnet build and dotnet release etc. .... per the documentation successfully. Things went on well and I moved all DLLs, json files, etc. from the publish folder to a folder called "dll" within the folder where node runs. So, it looks like this: C:\electron-quick-start\dll

var clrMethod = edge.func({
    assemblyFile: 'dll\\MyLibrary.dll',
    typeName: 'MyLibrary.Startup',
    methodName: 'Invoke'
});

clrMethod('This text comes from JavaScript!', function (error, result) {
    if (error) throw error;
    console.log(result);
});

When I run the js file, I receive the error message mentioned in the subject line. Then I set the following environment variables:

EDGE_USE_CORECLR=1
EDGE_APP_ROOT = C:\electron-quick-start\dll

But I received this error message / exception:

TypeError: edge.initializeClrFunc is not a function

Even I tried to put all contents of "dll" folder side by side where node is running and that resulted into no success. Also, I set app root to the exact publish folder generated by dotnet release and that was not conclusive either.

What is missing in this exercise or may have been done wrong?!

As a side note: I am using the recent version of electron-edge.

Trying to get Electron Edge up and running in Raspberry Pi Pixel for VBox i386 build.

I'm trying to build a Electron application for Windows and the Raspberry Pi Linux distribution. I really want to use Electron-Edge to allow me to use C# libraries. I'm looking to do a proof of concept for Windows, Raspberry Pi VBox, and the Actual Raspberry Pi ARM in the future.

The only issue I see is that Electron-Edge requires Mono x64, why? I have met all the other requirements. Is there something I need or can do in the build to fix this? Also what would I need to do for Mono Arm in the future?

I have install Mono 4.2.4 i386 and have built everything, but I'm getting the following error:

Uncaught Error: /home/pi/GH/node_modules/electron-edge/build/Release/edge_nativeclr.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEi
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
at Object.Module._extensions..node (module.js:598:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/pi/GH/node_modules/electron-edge/lib/edge.js:51:10)
at Object. (/home/pi/GH/node_modules/electron-edge/lib/edge.js:172:3)

What needs to be changed in the build to allow this to work?

Can't load DLL

I am unable to load the library here:
electron-edge\lib\native\win32\ia32\6.3.0\edge_nativeclr.node

It appears the library has been built with visual studio 2015 and now relies on msvcp140.dll. This file isn't distributed with the build that I have. I am running version 5.9.2-p0.

I worked around the problem by installing the CRT redist from VS 2015. Other people will certainly encounter this.

The specified module could not be found edge_nativeclr.node

Hi,
I'm getting this error when I try to install electron-edge 5.9.2-p0 on Windows 10. I was having the same error with 5.0.3-pre.

>npm install electron-edge
`-- [email protected]
  +-- [email protected]
  `-- [email protected]

> [email protected] install C:\Work\test\node_modules\electron-edge
> node tools/install.js

log  : Restoring packages for C:\Work\test\node_modules\electron-edge\lib\bootstrap\project.json...
error: Package Edge.js 5.9.2 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Edge.js 5.9.2 supports:
error:   - net40 (.NETFramework,Version=v4.0)
error:   - netstandard1.6 (.NETStandard,Version=v1.6)
error: Package Edge.js.CSharp 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Edge.js.CSharp 1.0.0 supports: netstandard1.6 (.NETStandard,Version=v1.6)
error: One or more packages are incompatible with .NETCoreApp,Version=v1.0.
info : Committing restore...
log  : Writing lock file to disk. Path: C:\Work\test\node_modules\electron-edge\lib\bootstrap\project.lock.json
log  : C:\Work\test\node_modules\electron-edge\lib\bootstrap\project.json
log  : Restore failed in 760ms.

Errors in C:\Work\test\node_modules\electron-edge\lib\bootstrap\project.json
    Package Edge.js 5.9.2 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Edge.js 5.9.2 supports:
      - net40 (.NETFramework,Version=v4.0)
      - netstandard1.6 (.NETStandard,Version=v1.6)
    Package Edge.js.CSharp 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Edge.js.CSharp 1.0.0 supports: netstandard1.6 (.NETStandard,Version=v1.6)
    One or more packages are incompatible with .NETCoreApp,Version=v1.0.

NuGet Config files used:
    C:\Users\pmoleri\AppData\Roaming\NuGet\NuGet.Config
    C:\ProgramData\nuget\Config\Microsoft.VisualStudio.Offline.config

Feeds used:
    https://api.nuget.org/v3/index.json
    C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
Project bootstrap (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling bootstrap for .NETCoreApp,Version=v1.0
C:\Work\test\node_modules\electron-edge\lib\bootstrap\project.json(13,27): error NU1002: The dependency Edge.js 5.9.2 does not support framework .NETCoreApp,Version=v1.0.
C:\Work\test\node_modules\electron-edge\lib\bootstrap\project.json(14,34): error NU1002: The dependency Edge.js.CSharp 1.0.0 does not support framework .NETCoreApp,Version=v1.0.

Compilation failed.
    0 Warning(s)
    2 Error(s)

Time elapsed 00:00:00.0125696

Load edge native library from: C:\Work\test\node_modules\electron-edge\lib\native\win32\x64\6.3.0\edge_nativeclr
***************************************
Error: The specified module could not be found.
\\?\C:\Work\test\node_modules\electron-edge\lib\native\win32\x64\6.3.0\edge_nativeclr.node
    at Error (native)
    at Object.Module._extensions..node (module.js:568:18)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Work\test\node_modules\electron-edge\lib\edge.js:50:8)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
***************************************
Success: platform check for edge.js: node.js x64 v6.3.0

I have Visual Studio 2015 Update 3 and .Net Core installed, although from the README I understand that having .Net 4.5 is enough.

Node: v6.3.0

** Update **

When I try to use it:

C:\Work\test>node
> require("electron-edge")
Load edge native library from: C:\Work\test\node_modules\electron-edge\lib\native\win32\x64\6.3.0\edge_nativeclr
Error: The specified module could not be found.
\\?\C:\Work\test\node_modules\electron-edge\lib\native\win32\x64\6.3.0\edge_nativeclr.node
    at Error (native)
    at Object.Module._extensions..node (module.js:568:18)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Work\test\node_modules\electron-edge\lib\edge.js:50:8)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
>
(To exit, press ^C again or type .exit)
>

C:\Work\test>dir C:\Work\test\node_modules\electron-edge\lib\native\win32\x64\6.3.0\edge_nativeclr.node
...
27/07/2016  16:06           157.696 edge_nativeclr.node
               1 File(s)        157.696 bytes

can not find node_module electron-edge

when I run my program by "npm start",it works well.
But when I packed it as asar and run again,the program can not start,and show error:
image
who can tell me why?

Error in macos

lucifer@LuciferdeMacBook-Pro  ~/Downloads/electron-edge-electron_v1.6.2/samples  node 101_hello_lambda.js
/Users/lucifer/Downloads/electron-edge-electron_v1.6.2/lib/edge.js:33
throw new Error('The edge native module is not available at ' + builtEdge
^

Error: The edge native module is not available at /Users/lucifer/Downloads/electron-edge-electron_v1.6.2/build/Release/edge_coreclr.node. You can use EDGE_NATIVE environment variable to provide alternate location of edge.node. If you need to build edge.node, follow build instructions for your platform at https://github.com/tjanczuk/edge
at Object. (/Users/lucifer/Downloads/electron-edge-electron_v1.6.2/lib/edge.js:33:11)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/Users/lucifer/Downloads/electron-edge-electron_v1.6.2/samples/101_hello_lambda.js:3:12)
at Module._compile (internal/modules/cjs/loader.js:701:30)

Edge with .net core external dll sample required.

I found this thread useful in this regard. tjanczuk#463. But I could not get this to work after building .net core project and generating .deps file. The electron app crashes as soon as I set EDGE_APP_ROOT to deps file location.
Everything working fine when dotnetcore code running inline with javascript. But I can't get external dotnetcore dll referenced. I couldn't find any step by step documentation or sample app in this regard, except for the thread above.

Here are the steps I followed,

  1. Create electron quick start app.
  2. Set the global.json to point to preview version of dotnetcore as newer version gave me build errors with electron-edge.
{
  "sdk": {
    "version": "1.0.0-preview2-003121"
  }
}
  1. Install electron-edge npm install electron-edge
  2. Ran helloworld sample. Working fine with dot net framework.
  3. set EDGE_USE_CORECLR=1
  4. Ran helloworld sample. Working fine with core clr.
  5. Create new dotnet core class library project with same sdk version 1.0.0-preview2-003121
  6. Added Edge.js nuget
{
  "version": "1.0.0-*",
  "buildOptions": {
    "debugType": "portable"
  },
  "dependencies": {},
  "frameworks": {
    "netcoreapp1.0": {
      "dependencies": {
        "Microsoft.NETCore.App": {
        "type": "platform",
        "version": "1.0.0"
        },
        "Edge.js": "6.5.0"
      }
    }
  }
}
  1. With dotnet restore and dotnet build created deps file and the dll
  2. When I point the EDGE_APP_ROOT to the debug folder where deps file and dll lives and run my electron app it crashes. Event log has following error.
Faulting application name: electron.exe, version: 1.6.8.0, time stamp: 0x5907b4b0
Faulting module name: KERNELBASE.dll, version: 10.0.15063.296, time stamp: 0xa0527b0c
Exception code: 0xc0000005
Fault offset: 0x0000000000030b24
Faulting process id: 0x20e0
Faulting application start time: 0x01d2d515deabec6f
Faulting application path: D:\Personal\TrainingCode\elec-edge\electron-q\node_modules\electron\dist\electron.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 53e8c650-6ca6-4bfa-afca-afb9300dbc24
Faulting package full name: 
Faulting package-relative application ID: 
  1. The crash happen when I require electron-edge. So it is not something with the javascript code I was using to refer to the dll. Please note I'm also confused how to refer to core dll in the javascript code as well. e.g You map a method in a core dll to a javascript function. Should it be static method or method with special signature like you do in inline c# code?

Please let me know if there is anything wrong with my steps referring my own core dll with edge. If you have a complete working sample it is much appreciated.

No such module: atom_common_app when trying to call C# dll method from angular in renderer process

I am trying to call a C# dll in the renderer process using electron-edge. The following code works when i call it directly from the renderer.js file, but when i pass the "integration" variable to angular, and angular calls it later on, i get the error at the bottom.
I dont know how the behaviour of calling it from the renderer process or from angular might cause a difference.

Does anyone has some ideas?

 var elec = require('electron');
 var edge = elec.remote.require('electron-edge')
 var csharpInvoke = edge.func({
    assemblyFile: '../Shared/bin/Debug/Shared.dll',
});

var csharpProxy = csharpInvoke(null, true);
var integration = csharpProxy.createIntegration(null, true);
console.log(integration);
console.log(integration.getChildren('ROOT', true)); // Works! but when called from angular, doesnt!

Full stackstrace

Error: No such module: atom_common_app
at Error (native)
at process.atomBinding (C:_Data\Repositories\sleek-application\Client\node_modules\electron\dist\resources\electron.asar\common\init.js:8:22)
at Object. (C:_Data\Repositories\sleek-application\Client\node_modules\electron\dist\resources\electron.asar\browser\api\app.js:3:26)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)


(anonymous function) @ angular.js:11595
(anonymous function) @ angular.js:8545
invokeLinkFn @ angular.js:8216
nodeLinkFn @ angular.js:7723
compositeLinkFn @ angular.js:7076
publicLinkFn @ angular.js:6955
updateView @ angular-ui-router.js:3839
(anonymous function) @ angular-ui-router.js:3801
$broadcast @ angular.js:14704
$state.transition.resolved.then.$state.transition @ angular-ui-router.js:3218
processQueue @ angular.js:13172
(anonymous function) @ angular.js:13188
$eval @ angular.js:14385$digest @ angular.js:14201
$apply @ angular.js:14490done @ angular.js:9647
completeRequest @ angular.js:9837
requestLoaded @ angular.js:9778

Can't build a valid win32 application using node 5.12.0

I tried manually building the libraries using tools\build release 5.12.0, but it's trying to use iojs-1.2 libraries instead.

https://gist.github.com/pocesar/bb7f30047d38a3e42698a4afed52d5c9

Although it says successful, when I tried to test the build library it gives:

c:\nodejs\node_modules\electron-edge>test\test ia32 5.12.0

c:\nodejs\node_modules\electron-edge>rem usage: test.bat [ia32|x64 {version}], e.g. test.bat x64 0.10.0
Using node.js: c:\nodejs\node_modules\electron-edge\test\\..\lib\native\win32\ia32\5.12.0\node.exe
Microsoft (R) Visual C# Compiler version 1.3.1.60616
Copyright (C) Microsoft Corporation. All rights reserved.

module.js:440
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: %1 is not a valid Win32 application.
\\?\c:\nodejs\node_modules\electron-edge\build\Release\edge_nativeclr.node
    at Error (native)
    at Object.Module._extensions..node (module.js:440:18)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (c:\nodejs\node_modules\electron-edge\lib\edge.js:46:8)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (c:\nodejs\node_modules\electron-edge\test\101_edge_func.js:1:74)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at C:\nodejs\node_modules\mocha\lib\mocha.js:220:27
    at Array.forEach (native)
    at Mocha.loadFiles (C:\nodejs\node_modules\mocha\lib\mocha.js:217:14)
    at Mocha.run (C:\nodejs\node_modules\mocha\lib\mocha.js:469:10)
    at Object.<anonymous> (C:\nodejs\node_modules\mocha\bin\_mocha:404:18)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:148:18)
    at node.js:405:3


  CACHE https://api.nuget.org/v3/index.json
Restoring packages for c:\nodejs\node_modules\electron-edge\test\project.json
Writing lock file c:\nodejs\node_modules\electron-edge\test\project.lock.json
Restore complete, 344ms elapsed

NuGet Config files used:
    F:\ProgramData\NuGet\Config\Microsoft.VisualStudio.Offline.config

I'm using node 5.12.0, windows 10 x64, node-gyp 3.4.0, VS 2015, windows SDK 10.
I can build anything natively using node-gyp (like socket.io, contextify, node-sass), so the tools might not be the culprit.

Issues installing from NPM

Evening,

I have been trying all day to get electron-edge installed. I keep receiving an error that a module could not be found. I have tried different version of node.js and electron while receiving the same error message. Is there something required im missing? Below is the error i have received.

C:\Users\shuppz\Desktop\electron testing>npm install [email protected] --save

> [email protected] install C:\Users\shuppz\Desktop\electron testing\node_modules\edge-cs
> node tools/install.js


> [email protected] install C:\Users\shuppz\Desktop\electron testing\node_modules\electron-edge
> node tools/install.js

***************************************
Error: The specified module could not be found.
\\?\C:\Users\shuppz\Desktop\electron testing\node_modules\electron-edge\lib\native\win32\x64\6.5.0\edge_nativeclr.node
    at Error (native)
    at Object.Module._extensions..node (module.js:583:18)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\shuppz\Desktop\electron testing\node_modules\electron-edge\lib\edge.js:49:8)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
***************************************
Success: platform check for edge.js: node.js x64 v6.4.0
[email protected] C:\Users\shuppz\Desktop\electron testing
`-- [email protected]
  +-- [email protected]
  `-- [email protected]

npm WARN [email protected] No description

make error on Ubuntu 17.10

I'm on ubuntu 17.10 with .NET core 2.13 and Mono 5.8. First time I tried to install electron-edge I got an error due to new version of dot net, so I ran dotnet migrate in electron-edge's directory and then npm rebuild electron-edge in main working directory. The result is this error:

make: Entering directory '/home/matteo/Scrivania/electron-quick-start/node_modules/electron-edge/build'
make: *** No rule to make target '../lib/bootstrap/project.json', needed by 'lib/bootstrap/project.lock.json'.  Stop.
make: Leaving directory '/home/matteo/Scrivania/electron-quick-start/node_modules/electron-edge/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/matteo/.nvm/versions/node/v6.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.13.0-32-generic
gyp ERR! command "/home/matteo/.nvm/versions/node/v6.9.0/bin/node" "/home/matteo/.nvm/versions/node/v6.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/matteo/Scrivania/electron-quick-start/node_modules/electron-edge
gyp ERR! node -v v6.9.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

How can I fix this?

Failed to find the Edge.js runtime assembly in the dependency manifest list

Hi,
I'm trying to get started with electron-edge. I could run the first hello world example using .net 4.5. But when I try to run the same example using core CLR I get following exception.

App threw an error during load
Error: Failed to find the Edge.js runtime assembly in the dependency manifest list.  Make sure that your project.json file has a reference to the Edge.js NuGet package.
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions..node (module.js:598:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (D:\Personal\TrainingCode\aspnetcore\newClean\node_modules\electron-edge\lib\edge.js:52:10)
    at Object.<anonymous> (D:\Personal\TrainingCode\aspnetcore\newClean\node_modules\electron-edge\lib\edge.js:174:3)

My setup is as follows.
Windows 10 64bit

  1. npm install electron-edge
  2. used dotnet migrate and npm rebuild to build electron-edge and edge-cs
  3. ran sample for .net 4.5
var helloWorld = edge.func(function () {/*
    async (input) => {
        return ".NET Welcomes " + input.ToString();
    }
*/});

  helloWorld('JavaScript', function (error, result) {
      if (error) throw error;
      console.log(result);
  });

It prints the output and worked fine.

Then I switched to core CLR
set EDGE_USE_CORECLR=1

Ran the app and got the exception above. I wasted about a day to get this to work.

Does anyone have a clue?

.NET dll in electron app

I hope this is not a silly question.

I have a .NET dll that I would like to use in my electron app.
In particular, I need to call a method of the dll and receive event raised from the dll.

Is this possible with electron-edge?
Many thanks

Problem with IWin32Windows = owned window of BrowserWindow(this)´;

Hello guys,
I am trying to assign to electron's current main window if I open MessageBox.Show(wintarget, ....);

My code is EdgeTest.Startup.cs:

using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EdgeTest
{
public class Startup
{
public async Task Invoke(dynamic input)
{
var payload = (IDictionary<string, object>)input;
var winTarget = (IWin32Window)payload["winTarget"];
return await TargetWin(winTarget);
}

    private async Task<object> TargetWin(IWin32Window ownedWin)
    {
        MessageBox.Show(
            ownedWin,
            "Hello it is an example message!",
            "From NodeJS",
            MessageBoxButtons.OK,
            MessageBoxIcon.Information
            );
        return null;
    }
}

}

And I add function link to open MessageBox while BrowserWindow of electron still opened.
Before I have created MessageBox without owner of current window. It works fine. But I wish MessageBox should "embed" to BrowserWindow of electron with edge.JS

<title>Hello World!</title>

Hello World!

We are using Node.js <script>document.write(process.versions.node)</script>, Chromium <script>document.write(process.versions.chrome)</script>, and Electron <script>document.write(process.versions.electron)</script>. link text <script> const {spawn} = require('child_process'); const {app, BrowserWindow} = require('electron'); var edge = require('electron-edge'); function MyFunction(){ var messagebox = edge.func('EdgeTest.dll'); // My dll was compiled by VS 2017 Community let win = new BrowserWindow(this); // I don't know if it is current window of electron application var input = {winTarget : win}; messagebox(input, function (error, result) { if (error) throw error; console.log(result); }); } </script <script> // You can also require other files to run in this process require('./renderer.js') </script>

But it doesn't show messagebox because it doesn't recognize if it gets wrong or wrong owner of window?
How do I fix? Or Is it bugged? If you try without targetwin and Use "IWin32Window owner; and MessageBox.Show(owner, ....);
than "var messagebox = edge.func( "Javascript", .... ) than it works fine but problem with owner of current window. Sorry for bad English.

StackOverflowException during Edge compiling of c# using .Net Core

Trying to use Electron, Edge, and .Net Core.
I'm getting a StackOverflowException when trying to call a method in my own compiled .Net Core assembly.

I followed the suggested additions to the .Net Core project setup etc as described here and here as per Edge documentation.

On Windows 10, using versions:

image

I set up a test project here to illustrate the problem: https://github.com/SeanSnyders/TestExamples/tree/master/Test-Electron-Edge-DotNetCore

To build and run, follow general instructions as per the project readme.md:
npm install
npm run rebuild
npm start

If I change this line
image

to use bridge-inline.js it works fine, but using bridge-external.js and calling the TestMe method in the .NET Core compiled assembly gives me a StackOverflowException during the Edge JIT compiling of the c# code, as illustrated by the trace output when the environment variable COREHOST_TRACE=1 is set:

image

I've tried various things to fix this. Playing around with EDGE_APP_ROOT etc, but no solution just yet.
Is there a problem with the environment, or can Edge not find my assembly? Would be odd giving a StackoverflowException though....

Help appreciated!

i can't get it to install

I can't find a reason or solution to this at all, but electron-edge won't install cleanly.

Ubuntu 16.04.2 "Xenial"
Node 6.10.2
Electron 1.6.2
.NET Core 1.0.1

As far as I can tell the .NET Core is installed and working correctly, as is node and electron. The following is the install output.

===========================================================================
bentleys@BENTLEYS:~/Documents/ext_root/tagworkspace/defsapp/electron$ npm install electron-edge

> [email protected] install /home/bentleys/Documents/ext_root/tagworkspace/defsapp/electron/node_modules/edge-cs
> node tools/install.js

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

> [email protected] install /home/bentleys/Documents/ext_root/tagworkspace/defsapp/electron/node_modules/electron-edge
> node tools/install.js

make: Entering directory '/home/bentleys/Documents/ext_root/tagworkspace/defsapp/electron/node_modules/electron-edge/build'
TOUCH Release/obj.target/edge_nativeclr.stamp
CXX(target) Release/obj.target/edge_coreclr/src/common/v8synchronizationcontext.o
CXX(target) Release/obj.target/edge_coreclr/src/common/edge.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/coreclrembedding.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/coreclrfunc.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/coreclrnodejsfunc.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/coreclrfuncinvokecontext.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/coreclrnodejsfuncinvokecontext.o
CXX(target) Release/obj.target/edge_coreclr/src/common/utils.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/pal/pal_utils.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/pal/trace.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/fxr/fx_ver.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/fxr/fx_muxer.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/json/casablanca/src/json/json.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/json/casablanca/src/json/json_parsing.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/json/casablanca/src/json/json_serialization.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/json/casablanca/src/utilities/asyncrt_utils.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/deps/deps_format.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/deps/deps_entry.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/deps/deps_resolver.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/host/args.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/host/coreclr.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/host/libhost.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/host/runtime_config.o
CXX(target) Release/obj.target/edge_coreclr/src/CoreCLREmbedding/pal/pal.unix.o
SOLINK_MODULE(target) Release/obj.target/edge_coreclr.node
COPY Release/edge_coreclr.node
ACTION binding_gyp_build_managed_target_restore_bootstrap_packages lib/bootstrap/project.lock.json
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
build_managed.target.mk:13: recipe for target 'lib/bootstrap/project.lock.json' failed
make: *** [lib/bootstrap/project.lock.json] Error 1
make: Leaving directory '/home/bentleys/Documents/ext_root/tagworkspace/defsapp/electron/node_modules/electron-edge/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-72-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/bentleys/Documents/ext_root/tagworkspace/defsapp/electron/node_modules/electron-edge
gyp ERR! node -v v6.10.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
[email protected] /home/bentleys/Documents/ext_root/tagworkspace/defsapp/electron
└─┬ [email protected]
├── [email protected]
└── [email protected]

npm WARN [email protected] No repository field.

===========================================================================

call dotnetframework dll Error Occurred Illegal characters in path

I use VS2017 create a .netframework4.5 dll, the dll has use a devExpress control,when electron call this dll ,Error Occurred,, Illegal characters in path
the key codes are as follows
let add = edge.func({ assemblyFile: path.join(__static, 'ClassLibrary1.dll'), typeName: 'ClassLibrary1.Class1', methodName: 'Add' }) ipcMain.on('calltest', (event, arg) => { add(arg, function (error, result) { if (error) throw error console.log(result) }) })
sorry , my english is not good.

Could not find edge_nativeclr.node

I'm using electron 1.2.0 with this package and am getting this error when launching the app.

App threw an error during load
Error: The specified module could not be found.
\\?\C:\Users\jeremy_castagnodev\Documents\development\tigerlily\tigerlily-salesman\build\node_modules\electron-edge\lib\
native\win32\x64\6.1.0\edge_nativeclr.node
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
    at Object.Module._extensions..node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:158:20)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\jeremy_castagnodev\Documents\development\tigerlily\tigerlily-salesman\build\node_mod
ules\electron-edge\lib\edge.js:46:8)

OS: Windows 7
Electron Version: 1.2.0
Electron-edge version: 5.0.3-pre1

Module did not self register - electron-edge.

I have been trying to build electron-edge for an application. I installed electron-edge using npm and ran the build.bat file inside tools directory of electron-edge and built the module again with node-gyp configure and node-gyp build. Everything was successfully built without any errors. But when I run the app using npm start it throws an error saying "Module did not self register".
Operating system : Windows 10 x64
Node Version : 6.3.1
Electron version : 1.4.4
Please look into this.

using log4net in edge C#

is it possible to use log4net inside the dll's i'm using via edge? if i run my dll via a simple hello world project, the log4net calls log, whereas if i invoke the same methods via edge, the methods run correctly, return correct data, but there is no log4net logging. is there some special namespace issue? i tried including the roslyn //r# for the additional log4net assemble; not luck.

Could not load file or assembly AutoMapper, Version=5.1.1.0, Culture=neutral

Have had a C# library which uses Automapper to map between two objects. When the code is running in C# context only (for e.g. as a console application, windows or web application) the things work fine. Now, the need is to invoke the same C# library from electron-edge. Attempting to do so results in getting the error message below:

Error: Could not load file or assembly 'AutoMapper, Version=5.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))

How can we address this issue?

edge_nativeclr.node not declared as a dependency

I am trying to load the file electron-edge with SystemJS and when I'll run the application an error is shown as below:

index.html:28 Error: (SystemJS) 
Module 
C:\Sistemas\RecebimentoDesktop\node_modules\electron-edge\build\Release\edge_nativeclr.node
not declared as a dependency of 
file:///C:/Sistemas/RecebimentoDesktop/node_modules/electron-edge/lib/edge.js

But there is the file edge.js in file:///C:/Sistemas/RecebimentoDesktop/node_modules/electron-edge/lib/edge.js

Thanks.

Uncaught Error: Specified procedure could not be found

I am running into the following issue using electron-edge:

Uncaught Error: The specified procedure could not be found.
\\?\C:\dev\Projects\xxx\xxx\node_modules\electron-edge\lib\native\win32\x64\6.3.0\edge_nativeclr.node
Error: The specified procedure could not be found.
\\?\C:\dev\Projects\xxx\xxx\node_modules\electron-edge\lib\native\win32\x64\6.3.0\edge_nativeclr.node
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
    at Object.Module._extensions..node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:158:20)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\dev\Projects\xxx\xxx\node_modules\electron-edge\lib\edge.js:50:8)

I am referencing it in my electron application using the follow:

var edge = require('electron').remote.require('electron-edge');

I noticed while installing electron-edge via npm I had a similar warning referring to edge_nativeclr.node:

node image

I am running node v6.3.1 and electron v1.3.3

Any clues as to what might be happening?

System.Reflection.AmbiguousMatchException: Ambiguous match found.

Hi,

When i'm trying to use electron-edge (latest) with electron (latest) I get this exception:

[repository]\node_modules\electron-edge\lib\edge.js:168 Uncaught System.Reflection.AmbiguousMatchException: Ambiguous match found.exports.func @ [repository]\node_modules\electron-edge\lib\edge.js:168greet @ index.html:21(anonymous function) @ index.html:17

On this line in the edge.js file:
return edge.initializeClrFunc(options);

When i'm doing this:

      var pathToDll = __dirname + "\\ClassLibrary1.dll";
      var GetCurrentStep = edge.func({
        assemblyFile: pathToDll,
        typeName: 'ClassLibrary1.Player',
        methodName: "GetCurrentStep"
      });

the edgeNative file is:

\node_modules\electron-edge\lib\native\win32\x64\6.5.0\edge_nativeclr

Any idea?

Can't work on Electron 1.7.2!!

edge_nativeclr.node was compiled against a different Node.js version using NODE_MODULE_VERSION 53. This version of Node.js requires NODE_MODULE_VERSION 54.

Electron-Edge fails to install with a MSBuild error

When trying to install electron-edge through npm, the application does not install correctly, rendering the package useless:

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
***************************************
Error: The edge module has not been pre-compiled for node.js version v8.2.1. You must build a custom version of edge.node. Please refer to https://github.com/tjanczuk/edge for building instructions.
    at determineVersion (C:\Root\App\app-contents\node_modules\electron-edge\lib\edge.js:18:11)
    at Object.<anonymous> (C:\Root\App\app-contents\node_modules\electron-edge\lib\edge.js:30:102)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Root\App\app-contents\node_modules\electron-edge\tools\checkplatform.js:2:2)
***************************************
Success: platform check for edge.js: node.js x64 v8.2.1
npm WARN Invalid name: "Aplicación Prototipo"
npm WARN app-contents No description
npm WARN app-contents No repository field.
npm WARN app-contents No README data
npm WARN app-contents No license field.

+ [email protected]
added 3 packages in 9.01s

Node.JS version: 8.2.1
NPM version: 5.3.0
Electron version: 1.6.11

Fix: msbuild fails during install - unsupported project.json

during install msbuild print 'no project found' warning and quits ...
its during command node tools/install.js - because lib/bootstrap/project.json file is no longer supported ...

after creating lib/bootstrap/project.csproj with content bellow and building it in VS2017 msbuild no longer prinnts 'no project found' ...

<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
      <TargetFramework>netcoreapp1.0</TargetFramework>
   </PropertyGroup>
   <ItemGroup>      
      <PackageReference Include="Edge.js" Version="7.10.1" />
      <PackageReference Include="Edge.js.CSharp" Version="1.2.0" />
   </ItemGroup>
</Project>

electron-edge vs edge

Hi,

From the README.md I can't tell what electron-edge does compared to edge. Can you explain what electron-edge includes/excludes compared to edge? And perhaps update the README?

Thanks,

Tom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.