firekylin / firekylin

A Simple & Fast Node.js Blogging Platform Base On ThinkJS3 & React & ES2015+
https://firekylin.lithub.cc
GNU General Public License v3.0
1.83k stars 390 forks source link

/admin API报错[Error: PREVENT_NEXT_PROCESS] #170

Closed billzbc closed 7 years ago

billzbc commented 8 years ago

pm2 logs如下:

You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection: 0|firekyli | Error: PREVENT_NEXT_PROCESS 0|firekyli | at Object.think.prevent (/data/web/firekylin/node_modules/thinkjs/lib/core/think.js:512:13) 0|firekyli | at _class.success (/data/web/firekylin/node_modules/thinkjs/lib/controller/base.js:479:18) 0|firekyli | at _class._callee2$ (/data/web/firekylin/app/admin/controller/api/options.js:223:20) 0|firekyli | at tryCatch (/data/web/firekylin/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:63:40) 0|firekyli | at GeneratorFunctionPrototype.invoke [as _invoke] (/data/web/firekylin/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:337:22) 0|firekyli | at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/data/web/firekylin/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:96:21) 0|firekyli | at step (/data/web/firekylin/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30) 0|firekyli | at /data/web/firekylin/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13 0|firekyli | at run (/data/web/firekylin/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:87:22) 0|firekyli | at /data/web/firekylin/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:100:28 0|firekyli | at flush (/data/web/firekylin/node_modules/babel-runtime/node_modules/core-js/library/modules/_microtask.js:18:9) 0|firekyli | at nextTickCallbackWith0Args (node.js:436:9) 0|firekyli | at process._tickDomainCallback (node.js:406:13)

billzbc commented 8 years ago

还发现 TypeError: Cannot read property 'apply' of undefined

TypeError: Cannot read property 'apply' of undefined 0|firekyli | at /data/web/firekylin/node_modules/thinkjs/node_modules/thinkit/lib/index.js:47:9 0|firekyli | at Promise._execute (/data/web/firekylin/node_modules/thinkjs/node_modules/bluebird/js/release/debuggability.js:272:9) 0|firekyli | at Promise._resolveFromExecutor (/data/web/firekylin/node_modules/thinkjs/node_modules/bluebird/js/release/promise.js:473:18) 0|firekyli | at new Promise (/data/web/firekylin/node_modules/thinkjs/node_modules/bluebird/js/release/promise.js:77:14) 0|firekyli | at /data/web/firekylin/node_modules/thinkjs/node_modules/thinkit/lib/index.js:46:12 0|firekyli | at _class._callee$ (/data/web/firekylin/app/admin/controller/api/theme.js:74:34) 0|firekyli | at tryCatch (/data/web/firekylin/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:63:40) 0|firekyli | at GeneratorFunctionPrototype.invoke as _invoke 0|firekyli | at GeneratorFunctionPrototype.prototype.(anonymous function) as next 0|firekyli | at step (/data/web/firekylin/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30) 0|firekyli | at /data/web/firekylin/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14 0|firekyli | at new Promise (/data/web/firekylin/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:191:7) 0|firekyli | at /data/web/firekylin/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12 0|firekyli | at /data/web/firekylin/app/admin/controller/api/theme.js:88:32 0|firekyli | at Array.filter (native) 0|firekyli | at _class._callee2$ (/data/web/firekylin/app/admin/controller/api/theme.js:67:18)

lizheming commented 8 years ago

你是直接安装的开发版还是下载压缩包安装的?

billzbc commented 8 years ago

@lizheming 安装的最新版压缩包

刚才去thinkjs里面看到了一个相似的问题 https://github.com/75team/thinkjs/issues/507

我的pm2也是用的cluster模式

status │ online │ │ name │ firekylin │ │ restarts │ 3 │ │ uptime │ 3m │ │ script path │ /data/web/firekylin/www/production.js │ │ script args │ │ │ error log path │ /root/.pm2/logs/firekylin-error-0.log │ │ out log path │ /root/.pm2/logs/firekylin-out-0.log │ │ pid path │ /root/.pm2/pids/firekylin-0.pid │ │ interpreter │ node │ │ interpreter args │ N/A │ │ script id │ 0 │ │ exec cwd │ /data/web/firekylin │ │ exec mode │ cluster_mode │ │ node.js version │ 4.6.2 │ │ watch & reload │ ✘ │ │ unstable restarts │ 0 │ │ created at │ 2016-11-17T09:30:19.128Z

lizheming commented 8 years ago

那我让 ThinkJS 那边看看吧,有消息了回你~

flftfqwxf commented 7 years ago

@lizheming 这个问题解决了没

lizheming commented 7 years ago

@flftfqwxf 还在处理中~

lizheming commented 7 years ago

@billzbc @flftfqwxf ThinkJS 2.2.15 应该已经修复此问题了,各位可以升级一下试试。