Jeff-Lewis / cls-hooked

cls-hooked : CLS using AsynWrap or async_hooks instead of async-listener for node 4.7+
BSD 2-Clause "Simplified" License
759 stars 89 forks source link

Doesn't work with Node 8.1.3 #7

Closed erezool closed 7 years ago

erezool commented 7 years ago

Node crashes with error: ../src/async-wrap.cc:349:void node::SetupHooks(const FunctionCallbackInfo<v8::Value> &): Assertionbefore_v->IsFunction()' failed. 1: node::Abort() [/usr/local/Cellar/node/8.1.3/bin/node] 2: node::MakeCallback(v8::Isolate, v8::Local, char const, int, v8::Local, double, double) [/usr/local/Cellar/node/8.1.3/bin/node] 3: node::SetupHooks(v8::FunctionCallbackInfo const&) [/usr/local/Cellar/node/8.1.3/bin/node] 4: v8::internal::FunctionCallbackArguments::Call(void ()(v8::FunctionCallbackInfo const&)) [/usr/local/Cellar/node/8.1.3/bin/node] 5: v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::BuiltinArguments) [/usr/local/Cellar/node/8.1.3/bin/node] 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate) [/usr/local/Cellar/node/8.1.3/bin/node] 7: 0x3b4d1000437d sh: line 1: 8851 Abort trap: 6 ts-node src/main `

Jeff-Lewis commented 7 years ago

Yes, this will occur in the current released version v4.1.5 of cls-hooked as I beleive the AsychWrap interface has changed in node 8.x to support the new async_hooks API.

I've been waiting for node 8.2.x to release a new version of cls-hooked that works with async_hooks but since we are getting this error, I might release a beta version until node 8.2.x is released. This will at least allow us to develop and test until 8.2.x

Jeff-Lewis commented 7 years ago

See #8 Add node engine limit <8 for 4.x branch

erezool commented 7 years ago

Thanks! Just to mention I got that error testing version 4.1.7

Jeff-Lewis commented 7 years ago

@erezool I just published an alpha version 5 of cls-hooked which works (so far) with node v8.1.3. Run npm i cls-hooked@alpha to give it a try. Let me know if you come across any issues with it.

erezool commented 7 years ago

@Jeff-Lewis Thank you! I've just completed sanity and it works well so far. I'd suggest we wait to node v8.2 and do sanity before you make an official release

Jeff-Lewis commented 7 years ago

Resolved in cls-hooked v4.2.0