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

[BUG] Assertion `args[0]->IsInt32()' failed. #12

Closed
Potherca opened this issue May 4, 2018 · 13 comments · Fixed by #16
Closed

[BUG] Assertion `args[0]->IsInt32()' failed. #12

Potherca opened this issue May 4, 2018 · 13 comments · Fixed by #16

Comments

@Potherca
Copy link

Potherca commented May 4, 2018

When I run any git-stats-html command I get the following error:

 git-stats-html --help
node[21442]: ../src/tcp_wrap.cc:146:static void node::TCPWrap::New(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[0]->IsInt32()' failed.
 1: node::Abort() [node]
 2: 0x55f8f5e9dd5d [node]
 3: node::TCPWrap::New(v8::FunctionCallbackInfo<v8::Value> const&) [node]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
 5: 0x55f8f581c7a6 [node]
 6: 0x55f8f581d089 [node]
 7: 0x3bd1e92840bd
Aborted (core dumped)

I am on NodeJs v8.10.0, if I need to provide any other information, feel free to ask.

@pbricout
Copy link

pbricout commented Jun 8, 2018

I have the same error with both 32 or 64 bits current latest versions of node v8.11.2.
I tested with a version of prior 8, i.e. v7.9.0 and it works.

@muus84
Copy link

muus84 commented Jul 18, 2018

Same here. Tried it with with node v10.6.0

@DavideFauri
Copy link

I can confirm that as well, running node v10.10.0 on macOS 10.13.

It appears to be related to this issue: nodejs/node#18389

Indeed, if I run grep -r "tcp_wrap" * while in the /usr/local/lib/node_modules folder I obtain:

git-stats/node_modules/debug-mode/lib/index.js: var TCP = process.binding("tcp_wrap").TCP,
git-stats-html/node_modules/debug-mode/lib/index.js: var TCP = process.binding("tcp_wrap").TCP,

It seems to be an issue of versions of node >= 8.10, as confirmed by: jsreport/jsreport-phantom-pdf#32

Looking into the actual index.js files, they are identical and both contain a piece of code taken directly from here: nodejs/node#9617 (comment)

The offending package seems to be debug-mode, which (luckily) has the same developer as our beloved git-stats: https://github.com/IonicaBizau/debug-mode

... and that's where my investigation ends. What I think should be done, is to revisit the discussion at nodejs/node#9617 , and use a different solution for testing if the process is in debug mode. I have no idea how to do it. Possibly with the suggestion at: nodejs/node#9617 (comment) ?

@DavideFauri
Copy link

I forgot another possible solution: move the package debug-mode into the devDependencies list of the tilda package, so that it's possible to run npm install --production git-stats git-stats-html and remove the need for debug-mode. This implies changing this line: https://github.com/IonicaBizau/tilda/blob/67fe229085f4b5167fab2bf7e1b63194ca66b775/lib/index.js#L285

Note that I'm assuming that debug-mode is needed only during development... @IonicaBizau, thoughts?

@vascofernandes
Copy link

same issue with Win 10 x64 , Node v10.10.

@rstml
Copy link

rstml commented Nov 9, 2018

same on macOS 10.14, node v10.10

@mrwogu
Copy link

mrwogu commented Nov 26, 2018

same issue with Win 10 x64 , Node v8.13.0.
Switched to Node 7.10.1 and works fine.

@ainthek
Copy link

ainthek commented Feb 7, 2019

abandon ware ?

@ainthek
Copy link

ainthek commented Feb 7, 2019

Please fix

@techanvil
Copy link

Same here with Node 10.15.0.

@grey-dev-0
Copy link

grey-dev-0 commented May 8, 2019

I had this problem also from node 8 and above, and apparently the developer hasn't been free to maintain the project so, I did git-stats-html part from scratch here. I've tried it on node 10, it's pretty basic so it should work on older node versions too.

@techanvil
Copy link

I had this problem also from node 8 and above, and apparently the developer hasn't been free to maintain the project so, I did git-stats-html part from scratch here. I've tried it on node 10, it's pretty basic so it should work on older node versions too.

Nice one @grey-dev-0 :)

@maccuaa
Copy link

maccuaa commented Dec 12, 2019

If anyone's interested i've also forked this and remove the tilda dependency. The fork by grey-dev-0 is also failing with an error in momentjs.

https://github.com/maccuaa/git-stats-html

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

Successfully merging a pull request may close this issue.