Node developer Wechat official account message replying to the xml returned by ctx.body cannot be received on Wechat.

node develops Wechat official account. Wechat cannot receive xml data returned by ctx.body

var sha1 = require ("sha1");
var Wechat = require (". / wechat")
var getRawBody = require ("raw-body")
var util = require (".. / libs/util")
var answer = require (". / answer")

module.exports = function (opts) {

var wechat = new Wechat(opts)
return async function(ctx,next){
    var token = opts.token;
    var signature = ctx.query.signature
    var nonce = ctx.query.nonce
    var timestamp = ctx.query.timestamp
    var echostr = ctx.query.ecostr
    var str = [token,timestamp,nonce].sort().join("")
    var sha = sha1(str)
    console.log("PPPP+"+ctx.method)
    if(ctx.method === "GET"){
        if(sha ===signature){
            ctx.body = ctx.query.echostr
        }else {
            ctx.body = "wrong"
        }
    }else if(ctx.method === "POST"){
        if(sha ===signature){
            ctx.body = ctx.query.echostr
        }else {
            ctx.body = "wrong"
            return false
        }
        var data = await getRawBody(ctx.req,{
            length : ctx.length,
            limit : "1mb",
            encoding : ctx.charset
        })
        var content = await util.parseXmlAsync(data)
        console.log("contentPPPP+"+content+"-------"+content.xml)
        if(content.xml.MsgType === "text"){
            var now = new Date().getTime()
            var output=answer.text(content.xml)
             ctx.body=output;
            console.log(output)
        }


    }
}

} xml

Apr.03,2022

check whether toUserName and fromUserName are written in reverse

in the xml format you introduced.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45ac5-44b67.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45ac5-44b67.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?