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

Cannot start a few examples for Nodejs bindings #88

Open
dukebarman opened this issue Oct 15, 2015 · 2 comments
Open

Cannot start a few examples for Nodejs bindings #88

dukebarman opened this issue Oct 15, 2015 · 2 comments
Labels
Milestone

Comments

@dukebarman
Copy link

# node r2irc.js 
 [=>] Initializing r2 core... 
/home/radare/bindings/radare2-bindings/node-ffi/node_modules/ffi/lib/_foreign_function.js:36
      throw new TypeError('Expected ' + numArgs +
            ^
TypeError: Expected 7 arguments, got 3
    at ForeignFunction.proxy (/home/radare/bindings/radare2-bindings/node-ffi/node_modules/ffi/lib/_foreign_function.js:36:13)
    at StructType.load (/home/radare/bindings/radare2-bindings/node-ffi/r_core.js:141:13)
    at Object.<anonymous> (/home/radare/bindings/radare2-bindings/node-ffi/examples/r2irc.js:59:10)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
# node bin.js 
/home/radare/bindings/radare2-bindings/node-ffi/node_modules/ffi/lib/_foreign_function.js:36
      throw new TypeError('Expected ' + numArgs +
            ^
TypeError: Expected 7 arguments, got 5
    at ForeignFunction.proxy (/home/radare/bindings/radare2-bindings/node-ffi/node_modules/ffi/lib/_foreign_function.js:36:13)
    at StructType.load (/home/radare/bindings/radare2-bindings/node-ffi/r_bin.js:141:13)
    at Object.<anonymous> (/home/radare/bindings/radare2-bindings/node-ffi/examples/bin.js:4:7)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Other examples are normally start.

@dukebarman dukebarman changed the title Cannot start a few example for Nodejs bindings Cannot start a few examples for Nodejs bindings Oct 15, 2015
@jpenalbae
Copy link
Collaborator

node.js ffi bindings are broken since long time ago...

Please try with r2pipe:
https://www.npmjs.com/package/r2pipe
https://github.com/radare/radare2-bindings/tree/master/r2pipe/nodejs

@XVilka We should probably kill the node-ffi bindings or at least make a note on the README.md about being disconnected in favor of r2pipe

@radare radare added the nodejs label Oct 23, 2015
@radare radare added this to the 1.0.0 milestone Oct 23, 2015
@radare
Copy link
Collaborator

radare commented Oct 23, 2015

Let's assign this task for 1.0, we have time to upgrade the valabind generator for latest node-ffi

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

No branches or pull requests

3 participants