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 · 45 comments

Comments

Projects
None yet
@bentoi
Copy link

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

This comment has been minimized.

Copy link
Member

commented Apr 26, 2018

See #20281 for more info and #20285

@wustzhaohui

This comment has been minimized.

Copy link

commented Jul 18, 2018

so what's the solution ?

@collinoswaltpsd

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Jul 19, 2018

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

@siddharthagit

This comment has been minimized.

Copy link

commented Jul 27, 2018

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

@i30

This comment has been minimized.

Copy link

commented Aug 4, 2018

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

@tterb

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Aug 4, 2018

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

@onokje

This comment has been minimized.

Copy link

commented Aug 5, 2018

Same here, npm i natives fixed it

@stevepiron

This comment has been minimized.

Copy link

commented Aug 6, 2018

Same here

@davidprae

This comment has been minimized.

Copy link

commented Aug 6, 2018

npm i natives did not solve it for me.

@ecker00

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Aug 11, 2018

@ecker00's Solution worked for me as well.

@worldbeater

This comment has been minimized.

Copy link

commented Aug 28, 2018

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Sep 3, 2018

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

@download13

This comment has been minimized.

Copy link

commented Sep 7, 2018

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.

@abominab

This comment has been minimized.

Copy link

commented Sep 10, 2018

@download13
That looks almost identical to mine. Been trying to fix this for 2 days now, nothing I've found online has worked.

gulp build --env dev
[15:31:44] Failed to load external module @babel/register [15:31:44] Requiring external module babel-register gulp[6048]: src\node_contextify.cc:637: Assertionargs[1]->IsString()' failed.
1: 00007FF69A0E9055
2: 00007FF69A0C2FE6
3: 00007FF69A0C30B1
4: 00007FF69A098B8A
5: 00007FF69A6DB022
6: 00007FF69A6DC1B8
7: 00007FF69A6DB51D
8: 00007FF69A6DB43B
9: 00000239F2B041C1
npm ERR! code ELIFECYCLE
npm ERR! errno 134

@josephkandi

This comment has been minimized.

Copy link

commented Nov 12, 2018

delete package-lock.json & npm i work for me.

This is what worked for me. I first did npm i natives and it solved the problem, but i felt i didnt need to install another package so the above worked perfectly.

@bnoordhuis

This comment has been minimized.

Copy link
Member

commented Nov 12, 2018

@joyeecheung Why did you reopen? Anything actionable?

@joyeecheung

This comment has been minimized.

Copy link
Member

commented Nov 13, 2018

@bnoordhuis Probably hit the wrong button...sorry. For posterity see #20325 (comment)

theLufenk added a commit to Nickersoft/push.js that referenced this issue Nov 14, 2018

fix(requestPermission): pass resolution callback
1) Safari doesn't return a promise when requestPermission is invoked. This was resulting in an error and the supplied resolution callback function was never called.

2) Additionally, Node v10 was promoted to LTS causing Travis CI to use it, resulting in a known bug: nodejs/node#20325 . This was fixed by specifying node v8 in travis config
@martinlevesque

This comment has been minimized.

Copy link

commented Nov 18, 2018

delete package-lock.json & npm i work for me.

This fixed the issue for me

@danjonesdev

This comment has been minimized.

Copy link

commented Dec 5, 2018

Not sure why... but npm i natives just works.

@fpk7660837

This comment has been minimized.

Copy link

commented Dec 25, 2018

npm i natives works,thanks

@dcworldwide

This comment has been minimized.

Copy link

commented Jan 5, 2019

delete package-lock.json & npm i

Fixed my issue. No need for npm i natives

@Hank-Liquidus

This comment has been minimized.

Copy link

commented Jan 5, 2019

delete package-lock.json & npm i

Fixed my issue. No need for npm i natives

dcworldwide, you are absolutely right, thank you!!

@Amirpasha10

This comment has been minimized.

Copy link

commented Jan 23, 2019

This steps resolved this problem:
Simply delete node_modules dir and package-lock.json.
Then run npm install --unsafe-perm=true

@jiteshkumawat

This comment has been minimized.

Copy link

commented Feb 4, 2019

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

This is a better solution than installing natives

@timweri timweri referenced this issue Feb 5, 2019

Closed

Update README.md #38

@tmutton

This comment has been minimized.

Copy link

commented Feb 11, 2019

delete package-lock.json & npm i

Fixed my issue. No need for npm i natives

This fixed my issue

Node: v4.2.3
NPM: 2.14.7

@kerryj89

This comment has been minimized.

Copy link

commented Feb 13, 2019

npm i natives worked for me in the end. The safer looking npm i did not work, nor did rm -r node_modules; npm install in my case.

@Jkettler

This comment has been minimized.

Copy link

commented Feb 13, 2019

If you're running into this because you're trying to start gulp through supervisor, check to see if you have a different version of node installed at /usr/local/bin/node -v.
This may be the version gulp is trying to use, despite whatever your nvm ls output says.

To insure you're running with a specific version, you can run it with a version argument to nvm run, e.g. nvm run 6.14.4 ./node_modules/gulp/bin/gulp.js dev.

This fixed the issue for me.

@phil-veloso

This comment has been minimized.

Copy link

commented Feb 19, 2019

Running npm i natives solved the problem for me.

@AlexCryptoStar

This comment has been minimized.

Copy link

commented Mar 8, 2019

Solved the problem for me.
rm -rf node_modules
rm -rf package-lock.json
npm i

@spjpgrd

This comment has been minimized.

Copy link

commented Mar 11, 2019

Came here because I'm working on getting a Microsoft Teams tab app up and running locally.

This did the trick to generate the manifest file:

cd ~/whateverYourProjectFolderIs
rm -rf node_modules
rm -rf package-lock.json
npm i natives

@spjpgrd spjpgrd referenced this issue Mar 11, 2019

Closed

nodejs #397

@AkiyamaMinami

This comment has been minimized.

Copy link

commented Mar 21, 2019

delete package-lock.json & npm i work for me.

cool~ solve it

@seaBubble

This comment has been minimized.

Copy link

commented May 2, 2019

Having this issue too

@tamimsyed700

This comment has been minimized.

Copy link

commented Jun 8, 2019

Same here. npm i natives fixed the issue.

@powelleric

This comment has been minimized.

Copy link

commented Jun 10, 2019

Had this issue today but could not resolve it with natives. I think I was using v10.16. Anyway, had to downgrade to v8, as suggested by others. I was able to use the latest v8: 8.16. Downloaded from here

@addaleax

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

Please don’t use old versions of gulp anymore. I’ve updated the issue description to reflect that this problem has been solved properly, namely through upgrading to gulp >= 4.0.0.

@magervino

This comment has been minimized.

Copy link

commented Jun 11, 2019

npm i natives worked for me as well.
Dunno if it is the reason of the problem (quite sure it is), but i just installed react on my laptop.
https://www.npmjs.com/package/react-native

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.