Open JeffHochberg opened 6 years ago
Unfortunately, Wireshark does not load Lua files in a stable way. As you discovered, xcmp.lua
is sometimes loaded before xnl.lua
. To work around this issue, you can rename xnl.lua
to xnl.luainc
and uncomment dofile("xnl.luainc")
.
I have followed the above instruction and now get an error at line 173 (dofile: file does not exist)
I have followed the above instruction and now get an error at line 173 (dofile: file does not exist)
same error her. win 11. wireshark 4.2.6
It might not work because in your case xnl.lua is in a subfolder. Can you check if it works with dofile("xcmp-xnl-dissector-master/xnl.lua")
?
I ran into the same problem even with both files in the root of the plugins
folder. Switching to an absolute path for xnl.lua
in the dofile
statement solved the problem.
Hello,
I'm attempting to use the LUA plugins with Wireshark 2.6 on Windows 7 SP1 x64. When I reload the LUA plugins, I'm getting an error on line 174 in the xcmp.lua plugin:
Lua: Error during loading: [string "C:\Program Files\Wireshark\plugins\2.6\xcmp.l..."]:174: bad argument #1 to 'new' (Field_new: a field with this name must exist)
If I open the xcmp.lua file, I see the following (lines 173 to 175):
-- dofile("xnl.luainc") -- uncomment to fix dependency order local xnl_opcode = Field.new("xnl.opcode") local xnl_transaction = Field.new("xnl.transaction")
The lines already appear to have been uncommented. I haven't tried to see what happens when commenting them out. I assume that they are uncommented because they are required.
I found the following article on Google that sounds similar to what's going on here but I'm stuck at this point:
https://osqa-ask.wireshark.org/questions/34562/lua-bad-argument-1-to-fieldnew-a-field-with-this-name-must-exist)
Any thoughts as to what might be happening here?