Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wireshark Error During Loading #1

Open
JeffHochberg opened this issue Sep 2, 2018 · 5 comments
Open

Wireshark Error During Loading #1

JeffHochberg opened this issue Sep 2, 2018 · 5 comments

Comments

@JeffHochberg
Copy link

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?

@george-hopkins
Copy link
Owner

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").

@george-hopkins george-hopkins pinned this issue Jan 31, 2019
@BobDucker55
Copy link

I have followed the above instruction and now get an error at line 173 (dofile: file does not exist)

@aagedh
Copy link

aagedh commented Aug 19, 2024

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

image

@george-hopkins
Copy link
Owner

george-hopkins commented Aug 23, 2024

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")?

@kjkriegel
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants