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

node asserts in node_contextify.cc:631 Assertion `args[1]->IsString()' failed #20325

Closed
bentoi opened this issue Apr 26, 2018 · 53 comments
Closed
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. vm Issues and PRs related to the vm subsystem.

Comments

@bentoi
Copy link

bentoi commented Apr 26, 2018

This issue has been solved: Please use a gulp version >= 4.0.0. Thank you.


  • Version: v10.0.0 (from HomeBrew)
  • Platform: macOS High Sierra 10.13.4
  • Subsystem: gulp

Trying to build our sources using the latest node, node crashes with the assert below when running gulp.

Step to reproduce:

$ git clone --depth 1 -b 3.7 https://github.com/zeroc-ice/ice
$ cd ice/js
$ npm install
$ npm run build

The stack trace:

$ npm run build

> ice@3.7.1 build /Users/benoit/Devel/GitHub/ice37/js
> gulp

gulp[46138]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
 1: node::Abort() [/usr/local/bin/node]
 2: node::Assert(char const* const (*) [4]) [/usr/local/bin/node]
 3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 7: 0x36ecf288427d
@apapirovski
Copy link
Member

apapirovski commented Apr 26, 2018

See #20281 for more info and #20285

@wustzhaohui
Copy link

so what's the solution ?

@collinoswaltpsd
Copy link

collinoswaltpsd commented Jul 18, 2018

@wustzhaohui my workaround was to downgrade in my particular case. 10.3.0 -> 8.11.2 (chose this version because it's what a coworker is using)

@wustzhaohui
Copy link

wustzhaohui commented Jul 19, 2018

I solve this problem by download node of v8.11.3 .

@siddharthagit
Copy link

I am also getting the same error after upgrading node version on Mac.

@i30
Copy link

i30 commented Aug 4, 2018

Don't understand why but run npm i natives solved the problem for me.

@tterb
Copy link

tterb commented Aug 4, 2018

@i30 That seems to have fixed the problem for me too, but I can't seem to figure out why either.

@timdhoffmann
Copy link

@i30 Thanks, i'm having a slightly different error output, but this helped me as well!

@onokje
Copy link

onokje commented Aug 5, 2018

Same here, npm i natives fixed it

@stevepiron
Copy link

Same here

@davidprae
Copy link

npm i natives did not solve it for me.

@ecker00
Copy link

ecker00 commented Aug 10, 2018

After reading the npm natives readme, it didn't seem like a good idea to use that solution. This fixed it for me:

rm -r node_modules
npm install

@cah-ranjithgampa
Copy link

@ecker00's Solution worked for me as well.

@worldbeater
Copy link

Experiencing the same error, npm i natives did the trick.
Don't understand why the issue is closed.
The bug actually exists and is rather annoying.

@a-r-m-i-n
Copy link

a-r-m-i-n commented Aug 29, 2018

I've also run in this error and the npm i natives fixed it! Deleting node_modules manually and reinstall everything, did not fix it!

Update: I've figured out that the given dependencies may occure this behaviour. Indeed, installing the package "natives" works, while reinstalling didn't work...

But when I cleanup the (messy) dependency list, my gulp tasks work like charm, also without installing "natives".

This was my required packages before the cleanup:

    "clean": "^4.0.2",
    "cssnano": "^4.0.0-rc.2",
    "del": "^3.0.0",
    "eslint": "^4.19.1",
    "eslint-config-standard": "^11.0.0",
    "eslint-plugin-import": "^2.11.0",
    "eslint-plugin-node": "^6.0.1",
    "eslint-plugin-promise": "^3.7.0",
    "eslint-plugin-standard": "^3.1.0",
    "gulp": "^3.9.1",
    "gulp-cli": "^2.0.1",
    "gulp-concat": "^2.6.1",
    "gulp-imagemin": "^4.1.0",
    "gulp-postcss": "^7.0.1",
    "gulp-rename": "^1.2.2",
    "gulp-sass": "^4.0.1",
    "gulp-sourcemaps": "^2.6.4",
    "gulp-uglify": "^3.0.0",
    "gulp-util": "^3.0.8",
    "gulp-watch": "^5.0.0",
    "postcss": "^6.0.22",
    "postcss-assets": "^5.0.0",
    "postcss-inline-svg": "^3.1.1",
    "postcss-preset-env": "^5.1.0",
    "postcss-pxtorem": "^4.0.1",
    "postcss-reporter": "^5.0.0",
    "postcss-scss": "^1.0.5",
    "postcss-syntax": "^0.28.0",
    "postcss-validator": "^0.2.0",
    "stylelint": "^9.2.0",
    "stylelint-config-recommended-scss": "^3.2.0",
    "stylelint-config-standard": "^18.2.0",
    "stylelint-scss": "^3.1.0"

And this after the cleanup:

    "clean": "^4.0.2",
    "cssnano": "^4.0.0-rc.2",
    "del": "^3.0.0",
    "gulp": "^3.9.1",
    "gulp-imagemin": "^4.1.0",
    "gulp-postcss": "^7.0.1",
    "gulp-rename": "^1.2.2",
    "gulp-sass": "^4.0.1",
    "gulp-sourcemaps": "^2.6.4",
    "postcss-assets": "^5.0.0",
    "postcss-inline-svg": "^3.1.1",
    "postcss-preset-env": "^5.1.0",
    "postcss-pxtorem": "^4.0.1",
    "postcss-reporter": "^5.0.0",
    "postcss-scss": "^1.0.5",
    "postcss-validator": "^0.2.0",
    "stylelint": "^9.2.0",
    "stylelint-config-recommended-scss": "^2.0.0",
    "stylelint-config-standard": "^17.0.0",
    "stylelint-scss": "^2.1.0"

Not sure which package was responsible for the issue... But I guess it's about wrong dependency versions which are fetched, because they were defined in packages.json.

@sherpa-nimesh
Copy link

@i30 Thanks Mate npm i natives solved the issue for me

@download13
Copy link

Just had this issue on 10.8.0

$ NODE_ENV=dev node server.js
MINGW64:/c/Users/downl/code/work/app[21376]: src\node_contextify.cc:637: Assertion `args[1]->IsString()' failed.
 1: 00007FF7E3BE9055
 2: 00007FF7E3BC2FE6
 3: 00007FF7E3BC30B1
 4: 00007FF7E3B98B8A
 5: 00007FF7E41DB022
 6: 00007FF7E41DC1B8
 7: 00007FF7E41DB51D
 8: 00007FF7E41DB43B
 9: 000000A85D0841C1

npm i natives did not help in my case.

@mdkacode
Copy link

Don't understand why but run npm i natives solved the problem for me.

Thank you so much it worked like a charm !! 👏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

No branches or pull requests