erlangpl icon indicating copy to clipboard operation
erlangpl copied to clipboard

runtime error

Open ssow opened this issue 5 years ago • 4 comments

Hi,

I'm facing a runtime error related to the websocket component.

Error in process <0.226.0> on node '[email protected]' with exit value: {undef,[{crypto,sha, [<<"DhX4I0c+u60EPDe8ETlV2w==258EAFA5-E914-47DA-95CA-C5AB0DC85B11">>], []}, {cowboy_websocket,websocket_handshake,3, [{file,"src/cowboy_websocket.erl"},{line,142}]}, {cowboy_protocol,execute,4, [{file,"src/cowboy_protocol.erl"},{line,522}]}]}

For your information, the node running on centos 7 with erlang/OTP 21

I've tried to recompile the tool but it fails with the following error 👍 error

/production/factory/erlangpl/node_modules/elm-format: Command failed. Exit signal: SIGABRT Command: binwrap-install Arguments: Directory: /production/factory/erlangpl/node_modules/elm-format Output: /usr/bin/node[1466]: ../src/node_contextify.cc:626:static void node::contextify::ContextifyScript::New(const v8::FunctionCallbackInfov8::Value&): Assertion `args[1]->IsString()' failed. 1: 0x8dc510 node::Abort() [/usr/bin/node] 2: 0x8dc5e5 [/usr/bin/node] 3: 0x91081e node::contextify::ContextifyScript::New(v8::FunctionCallbackInfov8::Value const&) [/usr/bin/node] 4: 0xb6166b [/usr/bin/node] 5: 0xb63602 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/bin/node]

Any suggestion appreciated.

Thank you

ssow avatar May 13 '19 20:05 ssow

Hello @ssow I can try to help with the first error on CentOS 7, which indicates you do not have the crypto application installed in your system. Try the following command sudo yum install erlang-crypto and then try running the tool again.

michalslaski avatar May 21 '19 09:05 michalslaski

Hello @michalslaski

I've installed the complete esl-erlang.x86_64 (21.3.7-1) package, which includes crypto-4.4.2. If this version is ok than the problem is somewhere else, I guess Thank you.

ssow avatar May 22 '19 10:05 ssow

@ssow OTP 20 removed the previously deprecated crypto:sha/1 function in favour of crypto:hash/2. It seems this project deserves an upgrade of the underlying cowboy library and a new release :)

Thanks so much for reporting the issue, which somehow went unnoticed for a long time!

michalslaski avatar May 27 '19 20:05 michalslaski

You're welcome. When can I expect to see the update ?

Thank you

ssow avatar May 28 '19 16:05 ssow