Describe the bug
Hey,
On newer versions of Wiremod I’m getting this error when trying to upload an Expression 2:
Expression 2 upload failed! Error message:
lua/wire/von.lua:793: vON: You must deserialize a string, not a nil
It does not happen on the version I currently have installed (about 3–4 updates behind). As soon as I update, the error starts appearing.
From what I can tell, the server-side upload code in expression2.lua does:
net.ReadStream(ply, function(data)
local ok, ret = pcall(WireLib.von.deserialize, data)
When the net stream fails or returns nothing, data is nil, and vON throws that error.
Would it be possible to add a simple guard so it doesn’t crash with the internal vON message? Something like this:
if not isstring(data) or #data == 0 then
local msg = "Expression 2 upload failed: received empty or nil data from the network stream.\nThis is usually caused by a network interruption, packet loss, a very large E2 + includes, or a client/server version mismatch."
WireLib.AddNotify(ply, msg, NOTIFY_ERROR, 8, NOTIFYSOUND_DRIP3)
print("[Wiremod] " .. msg)
return
end
That way players get a clear message instead of the cryptic vON error, and normal successful uploads stay unaffected.
Happy to provide more details or test any fix if needed.
Thanks!
How to reproduce the bug
No response
Describe the bug
Hey,
On newer versions of Wiremod I’m getting this error when trying to upload an Expression 2:
It does not happen on the version I currently have installed (about 3–4 updates behind). As soon as I update, the error starts appearing.
From what I can tell, the server-side upload code in
expression2.luadoes:When the net stream fails or returns nothing,
dataisnil, and vON throws that error.Would it be possible to add a simple guard so it doesn’t crash with the internal vON message? Something like this:
That way players get a clear message instead of the cryptic vON error, and normal successful uploads stay unaffected.
Happy to provide more details or test any fix if needed.
Thanks!
How to reproduce the bug
No response