blockchain explorer报错!

log/console.log报错如下:

    at Proxy.queryChannels (/opt/explorer/blockchain-explorer/app/platform/fabric/Proxy.js:233:40)

    at Platform.setChannels (/opt/explorer/blockchain-explorer/app/platform/fabric/Platform.js:186:35)

    at Platform.initialize (/opt/explorer/blockchain-explorer/app/platform/fabric/Platform.js:151:16)

    at Function.build (/opt/explorer/blockchain-explorer/app/platform/PlatformBuilder.js:13:28)

    at platformroutes (/opt/explorer/blockchain-explorer/app/explorer/rest/platformroutes.js:17:36)

    at Explorer.initialize (/opt/explorer/blockchain-explorer/app/explorer/Explorer.js:37:17)

    at <anonymous>

    at process._tickCallback (internal/process/next_tick.js:188:7)

root@ubuntu:/opt/explorer/blockchain-explorer# vi app/platform/fabric/config.json 

root@ubuntu:/opt/explorer/blockchain-explorer# rm -rf logs/

root@ubuntu:/opt/explorer/blockchain-explorer# ./start.sh 

root@ubuntu:/opt/explorer/blockchain-explorer# more logs/console/console.log-2018-08-01 

postgres://hppoc:password@127.0.0.1:5432/fabricexplorer

(node:11898) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'forEach' of undefined

    at Platform.setChannels (/opt/explorer/blockchain-explorer/app/platform/fabric/Platform.js:188:26)

    at <anonymous>

    at process._tickCallback (internal/process/next_tick.js:188:7)

(node:11898) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

(node:11898) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

log/app/app.log报错如下:
[2018-08-01 11:27:31.945] [ERROR] Query - TypeError: Cannot read property 'queryChannels' of undefined
    at Proxy.queryChannels (/opt/explorer/blockchain-explorer/app/platform/fabric/Proxy.js:233:40)
    at Platform.setChannels (/opt/explorer/blockchain-explorer/app/platform/fabric/Platform.js:186:35)
    at Platform.initialize (/opt/explorer/blockchain-explorer/app/platform/fabric/Platform.js:151:16)
    at Function.build (/opt/explorer/blockchain-explorer/app/platform/PlatformBuilder.js:13:28)
    at platformroutes (/opt/explorer/blockchain-explorer/app/explorer/rest/platformroutes.js:17:36)
    at Explorer.initialize (/opt/explorer/blockchain-explorer/app/explorer/Explorer.js:37:17)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
不知道什么鬼。。。。
请先 登录 后评论

1 个回答

melon-jj

这种问题是说JS里面没有这个方法。由于JS是脚本语言所以经常会出现版本问题。这种问题一般主要原因有二
1.方法名错了。请仔细查询文档
2.JS文件类库的版本有问题,所以没有更新这方法。

解决办法:
只要找到文档,再找到你下载的JS文件 ,执行调试查看方法,再查看下版本对应关系应该很好解决。

请先 登录 后评论
  • 2 关注
  • 0 收藏,998 浏览
  • sean 提出于 2018-08-01 11:33

相似问题