收藏
回答

每次必须手动运行一个云函数,然后就能正常。过一会就会报501000

问题类型 AppID 环境ID 基础库版本
Bug wx272cf2daa1cf8179 ddsf-9grs80c10b42f099 3.14.2

1图是云函数手动云端测试后,2图是过了一会

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

3 个回答

  • showms
    showms
    02-22

    代码是怎么写的?wx.cloud.init前面加个await试下呢?

    02-22
    有用
    回复 1
    • 🇺
      🇺
      发表于小程序端
      03-07

      最后人工给处理了。代码没什么问题,是账号问题

      03-07
      回复
  • 跨商通
    跨商通
    02-20

    写一个最简单的云函数来复现,

    02-20
    有用
    回复 1
    • 🇺
      🇺
      02-20
      这样行吗谢谢
      02-20
      回复
  • 智能回答 智能回答 本次回答由AI生成
    02-17
    有用
    回复 1
    • 🇺
      🇺
      02-17
      console:
      [CloudManager] callFunction开始 - name: createRoom, data: {nickname: "高山流水", avatarUrl: "", maxPlayers: 8}
      [CloudManager] 准备调用云函数: createRoom
      [CloudManager] 原始参数类型: object
      [CloudManager] 处理后参数类型: object
      [CloudManager] 参数内容: {"nickname":"高山流水","avatarUrl":"","maxPlayers":8}
      [CloudManager] wx.cloud.callFunction配置: {name: "createRoom", data: {…}}
      cloudManager.js? [sm]:30 [CloudManager] 云函数 createRoom 调用失败: Error: cloud.callFunction:fail Error: errCode: -501000 | errMsg: [100003] env not exists (2fa64500-4be6-4a92-b4b0-c3ac12c97f92) 更多错误信息请访问:https://docs.cloudbase.net/error-code/basic/INVALID_ENV (callId: 1771298316028-0.4913279719434047) (trace: 11:18:36 start->11:18:36 system error (Error: errCode: -501000 | errMsg: [100003] env not exists (2fa64500-4be6-4a92-b4b0-c3ac12c97f92) 更多错误信息请访问:https://docs.cloudbase.net/error-code/basic/INVALID_ENV), abort)
          at N (<anonymous>:1:255194)
          at <anonymous>:1:293136(env: Windows,mg,2.01.2510280; lib: 3.14.2)
      fail @ cloudManager.js? [sm]:30
      (anonymous) @ VM1126:1
      Q @ VM1126:1
      (anonymous) @ VM1126:1
      (anonymous) @ VM1126:1
      j @ VM1126:1
      (anonymous) @ VM1126:1
      Promise.catch (async)
      (anonymous) @ VM1126:1
      (anonymous) @ VM1126:1
      o.<computed> @ VM1126:1
      (anonymous) @ cloudManager.js? [sm]:22
      callFunction @ cloudManager.js? [sm]:5
      (anonymous) @ cloudManager.js? [sm]:42
      (anonymous) @ _ts_generator.js:1
      (anonymous) @ _ts_generator.js:1
      asyncGeneratorStep @ _async_to_generator.js:1
      c @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      createRoom @ cloudManager.js? [sm]:47
      (anonymous) @ gameRoomManager.js? [sm]:23
      (anonymous) @ _ts_generator.js:1
      (anonymous) @ _ts_generator.js:1
      asyncGeneratorStep @ _async_to_generator.js:1
      c @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      _createRoom @ gameRoomManager.js? [sm]:58
      createRoom @ gameRoomManager.js? [sm]:7
      value @ game.js? [sm]:1111
      action @ buttonManager.js? [sm]:89
      handleTouch @ eventManager.js? [sm]:96
      value @ game.js? [sm]:1310
      (anonymous) @ game.js? [sm]:341
      (anonymous) @ EventManager.js? [sm]:97
      value @ EventManager.js? [sm]:96
      value @ EventManager.js? [sm]:23
      callbackTouch @ gamePage.html:350
      (anonymous) @ gamePage.html:302
      Show 9 more frames
      cloudManager.js? [sm]:31 [CloudManager] 错误码: -1(env: Windows,mg,2.01.2510280; lib: 3.14.2)
      fail @ cloudManager.js? [sm]:31
      (anonymous) @ VM1126:1
      Q @ VM1126:1
      (anonymous) @ VM1126:1
      (anonymous) @ VM1126:1
      j @ VM1126:1
      (anonymous) @ VM1126:1
      Promise.catch (async)
      (anonymous) @ VM1126:1
      (anonymous) @ VM1126:1
      o.<computed> @ VM1126:1
      (anonymous) @ cloudManager.js? [sm]:22
      callFunction @ cloudManager.js? [sm]:5
      (anonymous) @ cloudManager.js? [sm]:42
      (anonymous) @ _ts_generator.js:1
      (anonymous) @ _ts_generator.js:1
      asyncGeneratorStep @ _async_to_generator.js:1
      c @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      createRoom @ cloudManager.js? [sm]:47
      (anonymous) @ gameRoomManager.js? [sm]:23
      (anonymous) @ _ts_generator.js:1
      (anonymous) @ _ts_generator.js:1
      asyncGeneratorStep @ _async_to_generator.js:1
      c @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      _createRoom @ gameRoomManager.js? [sm]:58
      createRoom @ gameRoomManager.js? [sm]:7
      value @ game.js? [sm]:1111
      action @ buttonManager.js? [sm]:89
      handleTouch @ eventManager.js? [sm]:96
      value @ game.js? [sm]:1310
      (anonymous) @ game.js? [sm]:341
      (anonymous) @ EventManager.js? [sm]:97
      value @ EventManager.js? [sm]:96
      value @ EventManager.js? [sm]:23
      callbackTouch @ gamePage.html:350
      (anonymous) @ gamePage.html:302
      Show 9 more frames
      cloudManager.js? [sm]:32 [CloudManager] 错误信息: cloud.callFunction:fail Error: errCode: -501000 | errMsg: [100003] env not exists (2fa64500-4be6-4a92-b4b0-c3ac12c97f92) 更多错误信息请访问:https://docs.cloudbase.net/error-code/basic/INVALID_ENV (callId: 1771298316028-0.4913279719434047) (trace: 11:18:36 start->11:18:36 system error (Error: errCode: -501000 | errMsg: [100003] env not exists (2fa64500-4be6-4a92-b4b0-c3ac12c97f92) 更多错误信息请访问:https://docs.cloudbase.net/error-code/basic/INVALID_ENV), abort)(env: Windows,mg,2.01.2510280; lib: 3.14.2)
      fail @ cloudManager.js? [sm]:32
      (anonymous) @ VM1126:1
      Q @ VM1126:1
      (anonymous) @ VM1126:1
      (anonymous) @ VM1126:1
      j @ VM1126:1
      (anonymous) @ VM1126:1
      Promise.catch (async)
      (anonymous) @ VM1126:1
      (anonymous) @ VM1126:1
      o.<computed> @ VM1126:1
      (anonymous) @ cloudManager.js? [sm]:22
      callFunction @ cloudManager.js? [sm]:5
      (anonymous) @ cloudManager.js? [sm]:42
      (anonymous) @ _ts_generator.js:1
      (anonymous) @ _ts_generator.js:1
      asyncGeneratorStep @ _async_to_generator.js:1
      c @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      createRoom @ cloudManager.js? [sm]:47
      (anonymous) @ gameRoomManager.js? [sm]:23
      (anonymous) @ _ts_generator.js:1
      (anonymous) @ _ts_generator.js:1
      asyncGeneratorStep @ _async_to_generator.js:1
      c @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      _createRoom @ gameRoomManager.js? [sm]:58
      createRoom @ gameRoomManager.js? [sm]:7
      value @ game.js? [sm]:1111
      action @ buttonManager.js? [sm]:89
      handleTouch @ eventManager.js? [sm]:96
      value @ game.js? [sm]:1310
      (anonymous) @ game.js? [sm]:341
      (anonymous) @ EventManager.js? [sm]:97
      value @ EventManager.js? [sm]:96
      value @ EventManager.js? [sm]:23
      callbackTouch @ gamePage.html:350
      (anonymous) @ gamePage.html:302
      Show 9 more frames
      cloudManager.js? [sm]:33 [CloudManager] 完整错误对象: {"errCode":-1,"errMsg":"cloud.callFunction:fail Error: errCode: -501000 | errMsg: [100003] env not exists (2fa64500-4be6-4a92-b4b0-c3ac12c97f92) 更多错误信息请访问:https://docs.cloudbase.net/error-code/basic/INVALID_ENV (callId: 1771298316028-0.4913279719434047) (trace: 11:18:36 start->11:18:36 system error (Error: errCode: -501000 | errMsg: [100003] env not exists (2fa64500-4be6-4a92-b4b0-c3ac12c97f92) 更多错误信息请访问:https://docs.cloudbase.net/error-code/basic/INVALID_ENV), abort)"}(env: Windows,mg,2.01.2510280; lib: 3.14.2)
      fail @ cloudManager.js? [sm]:33
      (anonymous) @ VM1126:1
      Q @ VM1126:1
      (anonymous) @ VM1126:1
      (anonymous) @ VM1126:1
      j @ VM1126:1
      (anonymous) @ VM1126:1
      Promise.catch (async)
      (anonymous) @ VM1126:1
      (anonymous) @ VM1126:1
      o.<computed> @ VM1126:1
      (anonymous) @ cloudManager.js? [sm]:22
      callFunction @ cloudManager.js? [sm]:5
      (anonymous) @ cloudManager.js? [sm]:42
      (anonymous) @ _ts_generator.js:1
      (anonymous) @ _ts_generator.js:1
      asyncGeneratorStep @ _async_to_generator.js:1
      c @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      createRoom @ cloudManager.js? [sm]:47
      (anonymous) @ gameRoomManager.js? [sm]:23
      (anonymous) @ _ts_generator.js:1
      (anonymous) @ _ts_generator.js:1
      asyncGeneratorStep @ _async_to_generator.js:1
      c @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      (anonymous) @ _async_to_generator.js:1
      _createRoom @ gameRoomManager.js? [sm]:58
      createRoom @ gameRoomManager.js? [sm]:7
      value @ game.js? [sm]:1111
      action @ buttonManager.js? [sm]:89
      handleTouch @ eventManager.js? [sm]:96
      value @ game.js? [sm]:1310
      (anonymous) @ game.js? [sm]:341
      (anonymous) @ EventManager.js? [sm]:97
      value @ EventManager.js? [sm]:96
      value @ EventManager.js? [sm]:23
      callbackTouch @ gamePage.html:350
      (anonymous) @ gamePage.html:302
      Show 9 more frames
      gameRoomManager.js? [sm]:55 创建房间失败: Error: cloud.callFunction:fail Error: errCode: -501000 | errMsg: [100003] env not exists (2fa64500-4be6-4a92-b4b0-c3ac12c97f92) 更多错误信息请访问:https://docs.cloudbase.net/error-code/basic/INVALID_ENV (callId: 1771298316028-0.4913279719434047) (trace: 11:18:36 start->11:18:36 system error (Error: errCode: -501000 | errMsg: [100003] env not exists (2fa64500-4be6-4a92-b4b0-c3ac12c97f92) 更多错误信息请访问:https://docs.cloudbase.net/error-code/basic/INVALID_ENV), abort)
          at N (<anonymous>:1:255194)
          at <anonymous>:1:293136(env: Windows,mg,2.01.2510280; lib: 3.14.2)
      完整日志:
      返回结果
      {"success":true,"roomId":"629718","roomData":{"_id":"629718","roomCode":"629718","creator":"oYvJc5bMpbIKdyoeRHGVs5AsO1zU","creatorInfo":{"nickname":"高山流水","avatarUrl":"","openid":"oYvJc5bMpbIKdyoeRHGVs5AsO1zU"},"players":[{"openid":"oYvJc5bMpbIKdyoeRHGVs5AsO1zU","nickname":"高山流水","avatarUrl":"","isReady":false,"isHost":true,"isSeen":false,"isFold":false,"isShowed":false,"isOnline":true,"card":"","cardInfo":null,"seat":1,"score":0,"wins":0,"losses":0,"joinTime":{"offset":0},"lastActiveTime":{"offset":0}}],"bottomCard":"","bottomCardInfo":null,"deck":["♥K","♣J","♠A","♣6","♣4","♥J","♠7","♦4","♣K","♥5","♣A","♥10","♠9","♦8","♥6","♦5","♣3","♥8","♠3","♣2","♣7","♦10","♥Q","♠10","♠K","♥A","♠8","♦3","♦2","♠4","♠5","♠2","♣8","♠Q","♥9","♠J","♦K","♥7","♦Q","♣9","♦J","♣Q","♣5","♦9","♦6","♥4","♥3","♥2","♣10","♦A","♦7","♠6"],"discardPile":[],"currentDeckCount":52,"status":"waiting","gameType":"standard","currentRound":1,"maxRounds":10,"maxPlayers":8,"minPlayers":2,"currentPlayerCount":1,"settings":{"autoStart":false,"roundLimit":10,"timeLimit":60,"allowSpectator":true,"privateRoom":false,"password":null,"allowChat":true},"gameHistory":[],"createdAt":{"offset":0},"updatedAt":{"offset":0},"startedAt":null,"endedAt":null,"hostScene":"roomScene","hostSceneUpdatedAt":{"offset":0},"expiresAt":{"offset":86400000},"statistics":{"totalActions":0,"totalChats":0,"peakPlayers":1}},"playerId":"oYvJc5bMpbIKdyoeRHGVs5AsO1zU"}
      日志
      Init Report RequestId: 3065eaf5-d97f-4ca0-a8ec-47758f2ef75d Coldstart: 547ms (InitRuntime: 13ms InitFunction: 534ms) Memory: 256MB MemUsage: 24.97MB
      START RequestId: 3065eaf5-d97f-4ca0-a8ec-47758f2ef75d
      Event RequestId: 3065eaf5-d97f-4ca0-a8ec-47758f2ef75d
      Response RequestId: 3065eaf5-d97f-4ca0-a8ec-47758f2ef75d RetMsg: {"success":true,"roomId":"629718","roomData":{"_id":"629718","roomCode":"629718","creator":"oYvJc5bMpbIKdyoeRHGVs5AsO1zU","creatorInfo":{"nickname":"高山流水","avatarUrl":"","openid":"oYvJc5bMpbIKdyoeRHGVs5AsO1zU"},"players":[{"openid":"oYvJc5bMpbIKdyoeRHGVs5AsO1zU","nickname":"高山流水","avatarUrl":"","isReady":false,"isHost":true,"isSeen":false,"isFold":false,"isShowed":false,"isOnline":true,"card":"","cardInfo":null,"seat":1,"score":0,"wins":0,"losses":0,"joinTime":{"offset":0},"lastActiveTime":{"offset":0}}],"bottomCard":"","bottomCardInfo":null,"deck":["♥K","♣J","♠A","♣6","♣4","♥J","♠7","♦4","♣K","♥5","♣A","♥10","♠9","♦8","♥6","♦5","♣3","♥8","♠3","♣2","♣7","♦10","♥Q","♠10","♠K","♥A","♠8","♦3","♦2","♠4","♠5","♠2","♣8","♠Q","♥9","♠J","♦K","♥7","♦Q","♣9","♦J","♣Q","♣5","♦9","♦6","♥4","♥3","♥2","♣10","♦A","♦7","♠6"],"discardPile":[],"currentDeckCount":52,"status":"waiting","gameType":"standard","currentRound":1,"maxRounds":10,"maxPlayers":8,"minPlayers":2,"currentPlayerCount":1,"settings":{"autoStart":false,"roundLimit":10,"timeLimit":60,"allowSpectator":true,"privateRoom":false,"password":null,"allowChat":true},"gameHistory":[],"createdAt":{"offset":0},"updatedAt":{"offset":0},"startedAt":null,"endedAt":null,"hostScene":"roomScene","hostSceneUpdatedAt":{"offset":0},"expiresAt":{"offset":86400000},"statistics":{"totalActions":0,"totalChats":0,"peakPlayers":1}},"playerId":"oYvJc5bMpbIKdyoeRHGVs5AsO1zU"}
      END RequestId: 3065eaf5-d97f-4ca0-a8ec-47758f2ef75d
      Report RequestId: 3065eaf5-d97f-4ca0-a8ec-47758f2ef75d Duration: 236ms Memory: 256MB MemUsage: 25.156250MB
      02-17
      回复
登录 后发表内容