- 消息推送Token校验失败
https://developers.weixin.qq.com/miniprogram/dev/framework/server-ability/message-push.html [图片]
2021-01-08 - miniprogram-api-promis ?
module "utils/miniprogram-api-promise.js" is not defined at require (VM561 WAService.js:2) at VM561 WAService.js:2 at wxp.js:1 at wrapFn (appservice?t=1604405165549:4449) at require (VM561 WAService.js:2) at VM561 WAService.js:2 at ve.onLaunch (app.js:8) at ve.<anonymous> (VM561 WAService.js:2) at new ve (VM561 WAService.js:2) at Function.<anonymous> (VM561 WAService.js:2)
2020-11-03 - 签名信息错误,验签失败
'request-id': '08D799FEFC0510DA071885CBEEA30620F26028FBBA04-270924360', { data: { code: 'SIGN_ERROR', message: ' 签名信息错误,验签失败' }, status: 401, headers: { server: 'nginx', date: 'Mon, 02 Nov 2020 04:36:39 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '68', connection: 'keep-alive', 'keep-alive': 'timeout=8', 'cache-control': 'no-cache, must-revalidate', 'x-content-type-options': 'nosniff', 'request-id': '08D799FEFC0510DA071885CBEEA30620F26028FBBA04-270924360', 'content-language': 'zh-CN' }, res: { status: 401, statusCode: 401, statusMessage: 'Unauthorized', headers: { server: 'nginx', date: 'Mon, 02 Nov 2020 04:36:39 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '68', connection: 'keep-alive', 'keep-alive': 'timeout=8', 'cache-control': 'no-cache, must-revalidate', 'x-content-type-options': 'nosniff', 'request-id': '08D799FEFC0510DA071885CBEEA30620F26028FBBA04-270924360', 'content-language': 'zh-CN' }, size: 68, aborted: false, rt: 120, keepAliveSocket: false, data: { code: 'SIGN_ERROR', message: ' 签名信息错误,验签失败' }, requestUrls: [ 'https://api.mch.weixin.qq.com/v3/certificates' ], timing: null, remoteAddress: '123.126.122.46', remotePort: 443, socketHandledRequests: 1, socketHandledResponses: 1 } } async signature(option) { const { message, privateKey = apiPrivateKey } = option; const signature = crypto .createSign(sha256WithRSAEncryption) .update(message) .sign(privateKey, 'base64') return signature; } async authorization(option) { const { ctx, logger } = this; const _ = ctx.helper.lodash; const getUUID = ctx.helper.getUUID; let { method, api, body, rondomStr = getUUID(32).toUpperCase(), timestamp = parseInt(( new Date().valueOf() + 60 * 1000)/ 1000), serialNo = certSerialNumber } = option; const message = `${method}\\n${api}\\n${timestamp}\\n${rondomStr}\\n${_.isEmpty(body) ? "" : JSON.stringify(body)}\\n`; const signature = await this.signature({ message }); const authorization = `WECHATPAY2-SHA256-RSA2048 mchid="${mchId}",nonce_str="${rondomStr}",signature="${signature}",timestamp="${timestamp}",serial_no="${serialNo}"`; logger.info('authorization str',authorization); return authorization; }
2020-11-02