Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: napi_set_instance_data #62

Open
prakashnarkhede91 opened this issue Aug 13, 2021 · 3 comments
Open

undefined symbol: napi_set_instance_data #62

prakashnarkhede91 opened this issue Aug 13, 2021 · 3 comments

Comments

@prakashnarkhede91
Copy link

Hi @kanaka, @TooTallNate,@jcupitt ,@addaleax

I build one electron application with biometrics integration
i used uareu-node npm

But it gives the error
node: symbol lookup error: node_modules/ref-napi/prebuilds/linux-x64/node.napi.node: undefined symbol: napi_set_instance_data

Please help us

@addaleax
Copy link
Contributor

@prakashnarkhede91 Most likely, you’re using an unsupported version of Node.js.

@addaleax
Copy link
Contributor

addaleax commented Aug 13, 2021

Also, the next time you bulk-ping people who are not actively involved in the development of a project, you’re blocked.

@Supriyaj29
Copy link

Hello,

Even I ran into this issue today. I am using ffi-napi, ref-napi, ref-array-di, ref-struct-di packages. My Implementation looks like this.

const ref = require('ref-napi');
const ffi = require('ffi-napi');
const struct = require('ref-struct-di')(ref);
const refarray = require('ref-array-di')(ref);
const charArray = refarray('char');

let crStatus = struct({
'status': ref.types.int,
'msg': new charArray(128)
});

let crStatusPtr = ref.refType(crStatus);

let crWrapper = ffi.Library('libXXX', {
'someFunction': ['int', [crStatusPtr, 'uint8*']],
});

let retval = new crStatus();
if ( crWrapper.someFunction(retval.ref(), someValue) !== 0) {
let errMsg = Buffer.from(ret.msg);
console.log(errMsg);
}

This same implementation is working fine with ref, ref-array, ref-struct and ffi on node 8. But after updating node version 12, I started getting lot of package deprecation errors. So I decided to update these package with the one which has node-12 support.

Is there anything missing in the implementation. I would really appreciate few pointers to debug this issue further.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants