mscdex/cap

lazy symbol binding failed

Closed this issue · 6 comments

I have been using cap for some time in an Ethernet AVB project. I use nwjs to provide a user interface.

I upgraded node.js to version 10.12 and nwjs to 0.33.4. When I run the following code:

var Cap = require('cap').Cap; // Enables AVDECC transmission
var OS = require('os');
var network = require('network');

var AVBNetworkIP = 0; // IP address of the Ethernet AVB port
var AVBNetworkMac = 0; // Mac address of the Ethernet AVB port
var wirelessIP = 0; // Wireless IP address
alert("Before new Cap");
var cDiscover = new Cap(); // A pcap object for AVDECC transmission
alert("after new Cap");

I get the following terminal error message:


dyld: lazy symbol binding failed: Symbol not found: __ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE
Referenced from: /Users/csrf/Documents/Immergo/ImmergoCode-SPK4-18-10-07/node_modules/cap/build/Release/cap.node
Expected in: flat namespace

dyld: Symbol not found: __ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE
Referenced from: /Users/csrf/Documents/Immergo/ImmergoCode-SPK4-18-10-07/node_modules/cap/build/Release/cap.node
Expected in: flat namespace

Received signal 6
[0x00010b8cbfcc]
[0x00010b8cbec1]
[0x7fffc3babb3a]
[0x0001094d7000]
[0x000109500464]
[0x0001094db793]
[0x0001094db89e]
[0x7fffc3998282]
[0x0001094cb060]
[0x00010a9eab98]
[0x00010a9e9d8e]
[0x00010a9e9727]
[0x00010b224cce]
[0x00010b196b60]
[0x002154d8a90a]
[end of stack trace]

Any help much appreciated!

This is most likely an issue with the integration with nwjs. cap works just fine with plain node. Unfortunately I'm not familiar with addon compatibility and potential issues with addons when it comes to using them with nwjs.

Thanks for the feedback, and also thanks for cap!
I will see if any of the nwjs related forums can help. The error message doesn't provide much guidance!
Something in the Cap constructor is causing problems - I imagine the bindings module must be involved somehow.

Are you using nw-gyp to rebuild cap?

Thanks for pointing me to nw-gyp. I had previously used nw-gyp, but then read on the nw.js site that this was not necessary. However on closer scrutiny, I see its not necessary for LTS releases. I was not using an LTS release, but the latest release of node.js. My next task is to determine what version of nwjs is compatible with the latest LTS version of node.js!

Just to let you know that cap is working fine with nwjs. I found the compatible nwjs version via the link:
https://nwjs.io/versions.json
Used the latest LTS version of node.js, the compatible version of nwjs - no need to use nw-gyp, and cap works perfectly. Thanks again for the cap module!

Thanks for the update. Glad to hear it's working for you now.