Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 无法评论和获取评论 #10

Closed
RimuruW opened this issue Oct 27, 2020 · 8 comments
Closed

[Bug] 无法评论和获取评论 #10

RimuruW opened this issue Oct 27, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@RimuruW
Copy link

RimuruW commented Oct 27, 2020

腾讯云后台云函数日志如下:

  • comment-submit
{"errorCode":-1,"errorMessage":"Error: EACCES: permission denied, open '/var/user/index.js'\n    at Object.openSync (fs.js:438:3)\n    at Object.readFileSync (fs.js:343:35)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:20)\n    at Module.load (internal/modules/cjs/loader.js:600:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:531:3)\n    at Module.require (internal/modules/cjs/loader.js:637:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at Object.module.exports.load (/var/runtime/node10/UserFunction.js:27:19)\n    at Runtime.handleOnce (/var/runtime/node10/Runtime.engine.js:95:38)"}
  • comment-get
{"errorCode":-1,"errorMessage":"Error: EACCES: permission denied, open '/var/user/index.js'\n    at Object.openSync (fs.js:438:3)\n    at Object.readFileSync (fs.js:343:35)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:20)\n    at Module.load (internal/modules/cjs/loader.js:600:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:531:3)\n    at Module.require (internal/modules/cjs/loader.js:637:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at Object.module.exports.load (/var/runtime/node10/UserFunction.js:27:19)\n    at Runtime.handleOnce (/var/runtime/node10/Runtime.engine.js:95:38)"}
  • counter-get
{"errorCode":-1,"errorMessage":"Error: EACCES: permission denied, open '/var/user/index.js'\n    at Object.openSync (fs.js:438:3)\n    at Object.readFileSync (fs.js:343:35)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:20)\n    at Module.load (internal/modules/cjs/loader.js:600:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:531:3)\n    at Module.require (internal/modules/cjs/loader.js:637:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at Object.module.exports.load (/var/runtime/node10/UserFunction.js:27:19)\n    at Runtime.handleOnce (/var/runtime/node10/Runtime.engine.js:95:38)"}

示例在线界面:
https://qingxu.live/about/

@imaegoo
Copy link
Member

imaegoo commented Oct 28, 2020

是否遗漏了安装步骤?

图片

  1. 进入环境-登录授权,启用“匿名登录”
  2. 进入环境-安全配置,将网站域名添加到“WEB安全域名”

@RimuruW
Copy link
Author

RimuruW commented Oct 28, 2020

是否遗漏了安装步骤?

图片

  1. 进入环境-登录授权,启用“匿名登录”
  2. 进入环境-安全配置,将网站域名添加到“WEB安全域名”

匿名登录开了,腾讯云 CloudBase 后台也显示了有新用户注册。

网站域名「qingxu.live」也有添加到安全域名里面

@imaegoo
Copy link
Member

imaegoo commented Oct 28, 2020

@QingxuMo

看起来不是 Twikoo 的云函数的报错,更像是腾讯云环境的报错,我无法重现这个问题。

能否登录腾讯云-云开发-云函数-comment-get-日志,看看调用日志?

@RimuruW
Copy link
Author

RimuruW commented Oct 28, 2020

@QingxuMo

看起来不是 Twikoo 的云函数的报错,更像是腾讯云环境的报错,我无法重现这个问题。

能否登录腾讯云-云开发-云函数-comment-get-日志,看看调用日志?

START RequestId: 078b4464-191b-11eb-95a9-525400979946

Event RequestId: 078b4464-191b-11eb-95a9-525400979946

 

ERROR RequestId:078b4464-191b-11eb-95a9-525400979946 Result:{"errorCode":-1,"errorMessage":"Error: EACCES: permission denied, open '/var/user/index.js'\n    at Object.openSync (fs.js:438:3)\n    at Object.readFileSync (fs.js:343:35)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:20)\n    at Module.load (internal/modules/cjs/loader.js:600:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:531:3)\n    at Module.require (internal/modules/cjs/loader.js:637:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at Object.module.exports.load (/var/runtime/node10/UserFunction.js:27:19)\n    at Runtime.handleOnce (/var/runtime/node10/Runtime.engine.js:95:38)"} 

END RequestId: 078b4464-191b-11eb-95a9-525400979946

Report RequestId: 078b4464-191b-11eb-95a9-525400979946 Duration:0ms Memory:128MB MemUsage:0.000000MB

@imaegoo
Copy link
Member

imaegoo commented Oct 29, 2020

@QingxuMo

你是第一个遇到这个问题的人,这不是Twikoo后端代码的报错,我无法确定是哪里的问题,建议在腾讯云发工单问一下。

我的建议是换一个操作系统或电脑重新部署一下云函数试试,不确定是否有效。

@imaegoo imaegoo added the bug Something isn't working label Oct 29, 2020
@RimuruW
Copy link
Author

RimuruW commented Oct 29, 2020

@imaegoo

之前是在手机上部署的,刚刚换 Linux 环境试了一下,comment-submit 依然报错,其他的正常,日志如下:

ERROR RequestId:77838085-19a2-11eb-a9c8-525400be5245 Result:{"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"Error: [ResourceNotFound] Db or Table not exist. Please check your request, but if the problem cannot be solved, contact us.\n    at Object.exports.E (/var/user/node_modules/@cloudbase/node-sdk/lib/utils/utils.js:44:12)\n    at processReturn (/var/user/node_modules/@cloudbase/node-sdk/lib/utils/utils.js:91:19)\n    at Object.exports.default (/var/user/node_modules/@cloudbase/node-sdk/lib/utils/httpRequest.js:353:20)\n    at process._tickCallback (internal/process/next_tick.js:68:7)"} 

@imaegoo
Copy link
Member

imaegoo commented Oct 29, 2020

@QingxuMo

这是个已知的bug,手动到云开发 - 数据库,新建一个集合,名字叫comment,其他选项默认,就可以了

下一个版本,我会修复该问题

@RimuruW
Copy link
Author

RimuruW commented Oct 29, 2020

已解决问题,感谢!
希望 Twikoo 能够继续完善其他功能,感觉这个是目前审查地区最理想的评论系统解决方案了😂

@RimuruW RimuruW closed this as completed Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants