Karma: Does not work in Node 10 (Assertion `args[1]->IsString()' failed)

Created on 17 Jun 2018  Â·  12Comments  Â·  Source: karma-runner/karma

Expected behaviour

karma start should execute tests as expected.

Actual behaviour

Running karma start results in the following error, a known issue in Node 10:

node[9155]: ../src/node_contextify.cc:629:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
 1: node::Abort() [/usr/local/bin/node]
 2: node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, char const*, int, v8::Local<v8::Value>*, node::async_context) [/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: 0x2315820041bd
 8: 0x23158200ee5d
 9: 0x23158208b2a0
10: 0x231582013429
11: 0x231582013429
12: 0x231582013429
[1]    9155 abort      node_modules/.bin/karma start

Environment Details

  • Karma version (output of karma --version): 2.0.3

Steps to reproduce the behaviour

  1. Be running Node >= 10
  2. Run karma start

Most helpful comment

@ktajpuri
Fix:
Run - npm install natives

All 12 comments

Our tests all pass on node 10 in Travis.

What makes you think this is a karma-runner bug, since you note: a known issue in Node 10?

I am getting exactly the same issue. I also have node 10. Did you find a resolution?

@ktajpuri
Fix:
Run - npm install natives

If you have a lockfile, check that you're on at least version 1.1.4 of natives. Prior versions won't work in Node v10.

Thank you very much for solving my problem。

Thank you very much

Help, i dind solve my problem

This does not look like an issue karma-runner can fix: it depends on the installed node environment.

@ktajpuri
Fix:
Run - npm install natives

thx

https://www.npmjs.com/package/natives

This package has been deprecated
Author message:

This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].

@ktajpuri
Fix:
Run - npm install natives

thank you. this worked for me

https://www.npmjs.com/package/natives

This package has been deprecated
Author message:

This module relies on Node.js's internals and will break at some point. Do not use it, and update to [email protected].

image
How did you solve it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

macjohnny picture macjohnny  Â·  5Comments

kiramclean picture kiramclean  Â·  4Comments

TKTheTechie picture TKTheTechie  Â·  4Comments

schippie picture schippie  Â·  5Comments

ebacka picture ebacka  Â·  3Comments