Skip to content

E2 Upload fails on newer Wiremod with “vON: You must deserialize a string, not a nil #3715

Description

@deathking61

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions