#2011 prosody/util/stanza.lua:50: invalid tag name: expected string, got nil

Reporter middles
Owner Nobody
Created
Updated
Stars ★ (1)
Tags
  • Type-Defect
  • Priority-Medium
  • Status-NeedInfo
  1. middles on

    I was investigating strange MAM behavior (requesting the last page didn't do that at all, but would either give nothing or pretty old messages depending on filters), and tried to switch from internal to MySQL storage to try to patch up/avoid the issue, but came across this error when running the migrator: ``` lua5.4: /usr/bin/prosody-migrator:143: /usr/lib/prosody/util/stanza.lua:50: invalid tag name: expected string, got nil stack traceback: [C]: in function 'error' /usr/lib/prosody/util/stanza.lua:50: in upvalue 'check_name' /usr/lib/prosody/util/stanza.lua:85: in function 'prosody.util.stanza.stanza' /usr/lib/prosody/util/stanza.lua:472: in function 'prosody.util.stanza.deserialize' /usr/lib/prosody/util/stanza.lua:475: in function 'prosody.util.stanza.deserialize' /usr/lib/prosody/modules/mod_storage_internal.lua:271: in for iterator 'for iterator' /usr/bin/prosody-migrator:192: in local 'migrate' /usr/bin/prosody-migrator:256: in upvalue 'func' /usr/lib/prosody/util/async.lua:149: in function </usr/lib/prosody/util/async.lua:147> stack traceback: [C]: in function 'error' /usr/bin/prosody-migrator:143: in local 'handler' /usr/lib/prosody/util/async.lua:244: in method 'run' /usr/bin/prosody-migrator:264: in main chunk [C]: in ? ``` I put in a `print` statement in mod_storage_internal's archive:find method, right before `item = st.deserialize(item)`, and sure enough, some stanzas are missing their name fields: ``` { { "i haven\'t seen a blue ethernet cable in like a decade probably lol"; ["attr"] = {}; ["name"] = "body"; }; { ["attr"] = { ["xmlns"] = "urn:xmpp:sid:0"; ["id"] = "a1efff84-caa2-41a9-bac6-8366500ba94c"; }; ["name"] = "origin-id"; }; { ["attr"] = { ["xmlns"] = "urn:xmpp:receipts"; }; }; { ["attr"] = { ["xmlns"] = "urn:xmpp:chat-markers:0"; }; }; ["attr"] = { ["xml:lang"] = "en"; ["type"] = "chat"; ["id"] = "a1efff84-caa2-41a9-bac6-8366500ba94c"; ["from"] = "a@b.c"; ["to"] = "d@b.c"; }; ["name"] = "message"; } ``` This server has been running for 10 months now, and since I come across this after the fact, I cannot give steps to reproduce. Prosody is 13.0.1, on Debian 13.

  2. MattJ on

    I've never seen this, nor seen it reported before... weird! What modules do you have loaded on your Prosody instance? Have you always been running 13.0.x, or did you previously use older versions and upgrade?

  3. Zash on

    Version of luaexpat and libexpat at the time this message was recorded would also be interesting to know.

    Changes
    • tags Status-NeedInfo

New comment

Not published. Used for spam prevention and optional update notifications.