收藏
回答

EACCES: permission denied / code -504002

框架类型 问题类型 终端类型 AppID 基础库版本
小程序 Bug 客户端 wx614c1c50af5bec05 2.2.5

你好大家,


I cannot find a solution to the error below. Can anybody help with that?


VM1437:1 [云函数] [login] 调用失败 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail cloud function service error code -504002, error message EACCES: permission denied, open '/var/user/index.js'; at cloud.callFunction api;
    at new t (WAService.js:22)
    at o (WAService.js:22)
    at Object.i [as returnAsFinalCloudSDKError] (WAService.js:22)
    at Function.success (WAService.js:21)
    at Object.success (WAService.js:4)
    at L.<anonymous> (WAService.js:7)
    at L.emit (WAService.js:8)
    at Function.<anonymous> (WAService.js:12)
    at WAService.js:6
    at e (appservice?t=1557377240982:1375)


Best

George 乔治

回答关注问题邀请回答
收藏

3 个回答

  • 大陈: Done is Better
    大陈: Done is Better
    2021-05-11
    {
      "permissions": {
        "openapi": [
          "wxacode.get",
          "templateMessage.send",
          "templateMessage.addTemplate",
          "templateMessage.deleteTemplate",
          "templateMessage.getTemplateList",
          "templateMessage.getTemplateLibraryById",
          "templateMessage.getTemplateLibraryList"
        ]
      }
    }
    
    增加了这段代码,问题还是没有解决,错误信息是:
    Error: EACCES: permission denied, open '/var/user/index.js'
    
    
    
    2021-05-11
    有用
    回复
  • George 乔治
    George 乔治
    2019-05-12

    @光 thank you for your help!

    I found the solution and post it here in case anyone faces the same error message. My cloud folder didn't contain the "config.json" files which include permissions.

    After i created those files and redeployed them to the cloud the error was gone.



    2019-05-12
    有用
    回复
  • 光
    2019-05-12

    Maby it's because you didn't open the permission of cloud development ? I saw "permission denied" in your error message.

    2019-05-12
    有用
    回复
登录 后发表内容