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

Lua: Error during loading on macOS #7

Open
imdreamrunner opened this issue Oct 16, 2017 · 7 comments
Open

Lua: Error during loading on macOS #7

imdreamrunner opened this issue Oct 16, 2017 · 7 comments

Comments

@imdreamrunner
Copy link

Hey guys, I have the following error during launch of the Wireshark.

Lua: Error during loading:
 ...gins/protobuf_dissector/modules/generic/proto_fields.lua:36: bad argument #3 to 'bytes' (Display must be either base.NONE, base.DOT, base.DASH, base.COLON or base.SPACE)

Wireshark version Version 2.4.2 (v2.4.2-0-gb6c63ae).
macOS version 10.12.6 (16G29)

@3fr61n
Copy link

3fr61n commented Nov 2, 2017

Error message at start up....

Lua: Error during loading:
...otobuf_dissector-master/modules/generic/proto_fields.lua:36: bad argument #3 to 'bytes' (Display must be either base.NONE, base.DOT, base.DASH, base.COLON or `base.SPACE)

macOS version 10.12.6 (16G29)
Wireshark Version 2.4.2 (v2.4.2-0-gb6c63ae)

@hashtree
Copy link

I got the same error. According to the latest wireshark lua api wiki, just figure out it caused by the update of api(ProtoField.bytes) in certain version after 1.12.0. So the fix is to update the 3 lines to as below in file proto_fields.lua.

36: value    = ProtoField.bytes ("protobuf.value", "Value", base.SPACE, "Field value bytes"),
43: GROUP    = ProtoField.bytes ("protobuf.group", "Group", base.SPACE, "Unknown Group Field"),
44: LENGTH_BYTES = ProtoField.bytes("protobuf.length_delimited_bytes", "Length Delimited Bytes", base.SPACE, "Unknown Length Delimited Field"),

Hope the helpful!


Ref: https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Proto.html

11.6.7.21. ProtoField.ubytes(abbr, [name], [display], [desc])
Creates a ProtoField for an arbitrary number of unsigned bytes.

Arguments
abbr
Abbreviated name of the field (the string used in filters).
name (optional)
Actual name of the field (the string that appears in the tree).
display (optional)
One of base.NONE, base.DOT, base.DASH, base.COLON or base.SPACE.
desc (optional)
Description of the field.

@BlackHobbiT
Copy link

Btw it's also appears on ubuntu 16.04 wireshark=2.4.3-1 too. And @hashtree recipe works!

@super-sean
Copy link

I got another error
Lua: Error during loading:
.../protobuf_dissector-master/modules/generic/proto.lua:35: bad argument #1 to 'new' (Proto_new: there cannot be two protocols with the same name)

@adityavikasd
Copy link

Changing line 35 in proto.lua to this helped:
GenericProto.proto = Proto.new("Protobuf2", "Google Protobuf Format")

@zoeyTM
Copy link

zoeyTM commented Aug 11, 2019

Running MacOS 10.14.5; Wireshark version 3.0.3

Got the plugin loaded without errors after following the suggestions from both @hashtree & @adityavikasd. Thanks guys!

@qjh-nj
Copy link

qjh-nj commented Nov 5, 2021

Running MacOS 10.14.5; Wireshark version 3.0.3

Got the plugin loaded without errors after following the suggestions from both @hashtree & @adityavikasd. Thanks guys!

Agree! Thanks you! @hashtree & @adityavikasd

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

8 participants