I had to resolve this issue recently. I found that the cause was missing dependencies.
When testing the alerts from the alerts page, I found that while an indication that the alert had been tested appeared in gvmd.log, no corresponding error message appeared. However, when I went into Scans > Reports, selected a report and then “Trigger Alert” in the top left, I could run the alert from there with the selected report, and doing so seemed to produce the missing error message, similar to below:
event alert:MESSAGE:2020-10-08 20h18.22 UTC:176036: The alert Export Reports was triggered (Event: Task status changed to 'Done', Condition: Always)
GLib:CRITICAL:2020-10-08 20h18.23 UTC:176043: g_file_get_contents: assertion 'contents != NULL' failed
md manage:WARNING:2020-10-08 20h18.23 UTC:176036: alert_script_exec: child failed, /usr/share/gvm/gvmd/global_alert_methods/4a398d42-87c0-11e5-a1c0-28d24461215b/alert '192.168.1.57' '4343' /tmp/gvmd_alert_ofXITd/report > /dev/null 2> /tmp/gvmd_alert_ofXITd/error_AlGe6d
I took particular notice of the last line, which had a path to a script that controlled how the method being used, in this case Send To, functioned. Fortunately it was simply a short shell script,
cat $3 | socat -t 0 - TCP:$1:$2
I quickly found that socat was not installed on my machine. Running “apt install socat”, it immediately started to work, both from the Scans > Reports page and Configuration > Alerts page. I repeated this process with the SCP method, and found sshpass was missing in that case. Likewise after running “apt install sshpass”, that method began working as well.