Skip to content

mod_invite does not respond to invite links, crashesΒ #4514

@ThomasLeister

Description

@ThomasLeister

Environment

  • ejabberd version: 26.01
  • Erlang version: Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 13.1.5
  • OS: Linux (Debian)
  • Installed from: source

Errors from error.log/crash.log

2026-01-23 12:32:04.487345+00:00 [error] <0.14089.0>@ejabberd_http:process/1:381 HTTP handler crashed: exception error: no match of right hand side value [356/1806]
{error,
[{"/usr/lib/ejabberd-26.01/priv/mod_invites/apps.json",
[{none,erlydtl_compiler,
{read_file,
"/usr/lib/ejabberd-26.01/priv/mod_invites/apps.json",
enoent}}]}],
[]}
in function mod_invites_http:file_to_renderer/2 (/root/ejabberd-sources/ejabberd-26.01/src/mod_invites_http.erl, line 317)
in call from mod_invites_http:render/4 (/root/ejabberd-sources/ejabberd-26.01/src/mod_invites_http.erl, line 344)
in call from mod_invites_http:apps_json/3 (/root/ejabberd-sources/ejabberd-26.01/src/mod_invites_http.erl, line 274)
in call from mod_invites_http:process_valid_token/3 (/root/ejabberd-sources/ejabberd-26.01/src/mod_invites_http.erl, line 150)
in call from ejabberd_http:process/2 (/root/ejabberd-sources/ejabberd-26.01/src/ejabberd_http.erl, line 378)
in call from ejabberd_http:process_request/1 (/root/ejabberd-sources/ejabberd-26.01/src/ejabberd_http.erl, line 508)
in call from ejabberd_http:process_header/2 (/root/ejabberd-sources/ejabberd-26.01/src/ejabberd_http.erl, line 300)
in call from ejabberd_http:parse_headers/1 (/root/ejabberd-sources/ejabberd-26.01/src/ejabberd_http.erl, line 225)
2026-01-23 12:32:04.488151+00:00 [error] <0.14089.0>@proc_lib:crash_report/4:539 CRASH REPORT:
crasher:
initial call: ejabberd_http:init/3
pid: <0.14089.0>
registered_name: []
exception error: no match of right hand side value
{error,
[{"/usr/lib/ejabberd-26.01/priv/mod_invites/apps.json",
[{none,erlydtl_compiler,
{read_file,
"/usr/lib/ejabberd-26.01/priv/mod_invites/apps.json",
enoent}}]}],
[]}
in function mod_invites_http:file_to_renderer/2 (/root/ejabberd-sources/ejabberd-26.01/src/mod_invites_http.erl, line 317)
in call from mod_invites_http:render/4 (/root/ejabberd-sources/ejabberd-26.01/src/mod_invites_http.erl, line 344)
in call from mod_invites_http:apps_json/3 (/root/ejabberd-sources/ejabberd-26.01/src/mod_invites_http.erl, line 274)
in call from mod_invites_http:process_valid_token/3 (/root/ejabberd-sources/ejabberd-26.01/src/mod_invites_http.erl, line 150)
in call from ejabberd_http:process/2 (/root/ejabberd-sources/ejabberd-26.01/src/ejabberd_http.erl, line 378)
in call from ejabberd_http:process_request/1 (/root/ejabberd-sources/ejabberd-26.01/src/ejabberd_http.erl, line 508)
in call from ejabberd_http:process_header/2 (/root/ejabberd-sources/ejabberd-26.01/src/ejabberd_http.erl, line 300)
in call from ejabberd_http:parse_headers/1 (/root/ejabberd-sources/ejabberd-26.01/src/ejabberd_http.erl, line 225)
ancestors: [ejabberd_http_sup,ejabberd_sup,<0.123.0>]
message_queue_len: 0
messages: []
links: [<0.4594.0>,#Port<0.7451>]
dictionary: []
trap_exit: false
status: running
heap_size: 10958
stack_size: 28
reductions: 38022
neighbours:

Bug description

If a mod_invites Link is browsed via the web browser, a crash occurs and my nginx proxy throws an upstream error. After some investigation, it turned out that the directory priv/mod_invites was not installed to my system via "make install".

A manual cp -r priv/mod_invites /usr/lib/ejabberd-26.01/priv/ fixed the issue.
Probably the Makefile needs some updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component:InvitesInvite-based account registration, implemented in mod_invites

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions