emqx / emqx-lua-hook

EMQX Lua Hook

Home Page:https://www.emqx.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error: load xxx.lua

chenqy2018 opened this issue · comments

(emqttd@127.0.0.1)1> 13:05:33.233 [error] Lua Hook: Failed to load lua script "hook_lua/test.lua" due to error {undef,[{luerl_scan,string,["\nfunction on_message_publish(clientid, username, topic, payload, qos, retain)\n return topic, "hello", qos, retain\nend\n\nfunction register_hook()\n return "on_message_publish"\nend\n\n\n"],[]},{luerl_comp,do_read_file,1,[{file,"src/luerl_comp.erl"},{line,176}]},{luerl_comp,do_passes,2,[{file,"src/luerl_comp.erl"},{line,133}]},{luerl_comp,compile,2,[{file,"src/luerl_comp.erl"},{line,98}]},{luerl,loadfile,2,[{file,"src/luerl.erl"},{line,95}]},{luerl,dofile,2,[{file,"src/luerl.erl"},{line,72}]},{emq_lua_hook_cli,do_load,1,[{file,"src/emq_lua_hook_cli.erl"},{line,177}]},{emq_lua_hook_cli,'-do_loadall/0-lc$^0/1-0-',1,[{file,"src/emq_lua_hook_cli.erl"},{line,173}]}]}

What's your emqttd version? A recent bug fix has solved similar problem. Please refer to this week's official release.

hi,

wget http://emqtt.com/downloads/latest/ubuntu14_04

OS: Ubuntu 14.04 64bit
Erlang/OTP: 19
EMQ: Latest (2.2 beta)

Nothing has changed, same before.

@chenqy2018 Sorry for the confusion. The version that fixes this problem should be 2.2beta.2 on this friday. And the version you test is 2.2beta.1.

It's work, thank you.