#850 [mod_c2s] Traceback[c2s]: /usr/lib/prosody/util/stanza.lua:207: bad argument #1 to 's_gsub' (string expected, got boolean)

Reporter Siwei Luo
Owner MattJ
Created
Updated
Stars ★ (1)  
Tags
  • Status-New
  • Priority-Medium
  • Type-Defect
  1. Siwei Luo on

    prosody is flooding the error log after service start. What steps will reproduce the problem? 1. start prosody What is the expected output? What do you see instead? mod_c2s error Traceback[c2s]: /usr/lib/prosody/util/stanza.lua:207: bad argument #1 to 's_gsub' (string expected, got boolean) stack traceback: [C]: in function 's_gsub' /usr/lib/prosody/util/stanza.lua:207: in function '_xml_escape' /usr/lib/prosody/util/stanza.lua:219: in function 'self' /usr/lib/prosody/util/stanza.lua:230: in function '_dostring' /usr/lib/prosody/util/stanza.lua:240: in function </usr/lib/prosody/util/stanza.lua:238> [C]: in function 'tostring' /usr/lib/prosody/core/sessionmanager.lua:39: in function 'send' /usr/lib/prosody/modules/mod_offline.lua:47: in function '?' /usr/lib/prosody/util/events.lua:78: in function </usr/lib/prosody/util/events.lua:74> (tail call): ? ... [C]: in function 'parse' /usr/lib/prosody/util/xmppstream.lua:271: in function 'feed' /usr/lib/prosody/modules/mod_c2s.lua:248: in function 'data' /usr/lib/prosody/modules/mod_c2s.lua:271: in function </usr/lib/prosody/modules/mod_c2s.lua:268> (tail call): ? /usr/lib/prosody/net/server_select.lua:879: in function </usr/lib/prosody/net/server_select.lua:861> [C]: in function 'xpcall' /usr/bin/prosody:396: in function 'loop' /usr/bin/prosody:427: in main chunk [C]: ? What version of the product are you using? On what operating system? prosody 0.10 nightly 361 # OS Debian 8 # Lua Lua 5.1 LuaFileSystem 1.6.2 LuaExpat 1.3.0 LuaSocket 3.0-rc1 ssl: 0.5.PR

  2. MattJ on

    Hi, thanks for the report! This looks like a corrupt message in the offline storage. When the user logs in, Prosody tries to deliver the message to them, but fails. If you temporarily enable debug logging, you should see in the logs just before the error which user is logging in. Then you can move out their store file from (probably) /var/lib/prosody/<encoded domain>/offline/<encoded username>.dat The file can be opened in a text editor, and will contain a representation of the message that Prosody is failing to load. If it does not contain any sensitive data, we would really appreciate it if you could email a copy to developers@prosody.im so that we can see what went wrong.

    Changes
    • owner MattJ
  3. sluo on

    Hi MattJ, thank you for your fast response. Unfortunately due to data privacy restrictions I cannot provide any files. /var/lib/prosody/<encoded domain>/offline/ does not contain any .dat but .list files. Those .list files contain cyrillic characters from time to time. Could that be a problem? Are there any special characters I should particularly look into? Thanks and best regards, Siwei

  4. Zash on

    Cyrillic characters should not be a problem. Can you tell how large the file is, and how many entries there are? The later can be found out by searching for lines that start with "item(".

  5. sluo on

    Largest .list file I found is around 863 KB and contains 658 entries with item({

New comment