云开发中云函数使用"tcb-router"出现超时错误?
发布于 5 年前 作者 juan25 9519 次浏览 来自 问答

从今天(2021-04-14)15:52分之后,云开发调用使用"tcb-router"的云函数一直失败,本地上传云函数、小程序端访问不使用"tcb-router"的云函数和数据库都正常。此前未出现过此类问题,此问题一直必现。超时时长使用默认、修改成150秒,还是有问题。确认云函数编写无问题,此前一直在使用。

小程序端调用云函数报错如下:

VM551

WAService.js:2 Error: errCode: -404011 cloud function execution error |

errMsg: cloud.callFunction:fail requestID

8b25fc7b-9cfb-11eb-9736-52540096f86f, cloud function service error code

-504002, error message Runtime.UserCodeSyntaxError: SyntaxError: Invalid

or unexpected token    at Object.module.exports.load

(:49925/var/runtime/node10/UserFunction.js:33)    at Runtime.handleOnce

(:49925/var/runtime/node10/Runtime.engine.js:95)    at

Timeout.setTimeout [as _onTimeout]

(:49925/var/runtime/node10/Runtime.engine.js:54)    at ontimeout

(:49925/appservice/timers.js:436)    at tryOnTimeout

(:49925/appservice/timers.js:300)    at listOnTimeout

(:49925/appservice/timers.js:263)    at Timer.processTimers

(:49925/appservice/timers.js:223) (callid

1618388974722-0.022030871752495296); at cloud.callFunction api;     at

new g (VM551 WAService.js:2)    at c (VM551 WAService.js:2)    at I

(VM551 WAService.js:2)    at e (VM551 WAService.js:2)

云函数日志报错如下:

返回结果

{“errorCode”:-1,“errorMessage”:"Runtime.UserCodeSyntaxError:

SyntaxError: Invalid or unexpected token\n    at

Object.module.exports.load (/var/runtime/node10/UserFunction.js:33:13)\n

   at Runtime.handleOnce

(/var/runtime/node10/Runtime.engine.js:95:38)\n    at Timeout.setTimeout

[as _onTimeout] (/var/runtime/node10/Runtime.engine.js:54:12)\n    at

ontimeout (timers.js:436:11)\n    at tryOnTimeout (timers.js:300:5)\n  

 at listOnTimeout (timers.js:263:5)\n    at Timer.processTimers

(timers.js:223:10)",“statusCode”:443}

日志

START RequestId:8b25fc7b-9cfb-11eb-9736-52540096f86f

ERROR

RequestId:8b25fc7b-9cfb-11eb-9736-52540096f86f

Result:{“errorCode”:-1,“errorMessage”:"Runtime.UserCodeSyntaxError:

SyntaxError: Invalid or unexpected token\n    at

Object.module.exports.load (/var/runtime/node10/UserFunction.js:33:13)\n

   at Runtime.handleOnce

(/var/runtime/node10/Runtime.engine.js:95:38)\n    at Timeout.setTimeout

[as _onTimeout] (/var/runtime/node10/Runtime.engine.js:54:12)\n    at

ontimeout (timers.js:436:11)\n    at tryOnTimeout (timers.js:300:5)\n  

 at listOnTimeout (timers.js:263:5)\n    at Timer.processTimers

(timers.js:223:10)",“statusCode”:443}

END RequestId:8b25fc7b-9cfb-11eb-9736-52540096f86f

Report RequestId:8b25fc7b-9cfb-11eb-9736-52540096f86f Duration:0ms Memory:256MB MemUsage:0.000000MB

1 回复
回到顶部