收藏
回答

云开发数据库实时数据推送,又不能用了,没人管管吗?

框架类型 问题类型 终端类型 AppID 环境ID 基础库版本
小游戏 Bug 微信安卓客户端 wx14259901c1396da6 findtheone-74b5l Wechat Lib:2.11.2, 2020.6.10 23:33:21

刚刚好了没几天,又出现了这样的问题了,还是云开发数据库watch监听的bug,请官方管理员来看一下。

下面是6月12日发的求助内容:

昨天上午还好好的,晚上就报错了。调试了整晚,手机端还是这个错误。偏偏在微信开发者工具上是正常的。

errCode: -402012 这个错误号,在帮助文档里面都找不到。

Uncaught (in promise) FrameworkError <TypeError: Cannot add property Map, object is not extensible>

&lt;TypeError: Cannot add property Map, object is not extensible&gt;<div class="eruda-json eruda-hidden"></div>

at e.value (wagame://servicewechat.com/WAGameVConsole.html:27576:37895)

at new e (wagame://servicewechat.com/WAGameVConsole.html:27576:36659)

at t.value (wagame://servicewechat.com/WAGameVConsole.html:27576:32217)

at t.value (wagame://servicewechat.com/WAGameVConsole.html:27576:31461)

at f.e.<computed> [as error] (wagame://servicewechat.com/WAGameVConsole.html:27576:16382)

at wagame://servicewechat.com/WAGameVConsole.html:27576:19192

at Array.forEach (<anonymous>)

at console._log (wagame://servicewechat.com/WAGameVConsole.html:27576:19080)

at <anonymous>:1:9



代码片段:

var db = wx.cloud.database();

var watcher1 = db.collection('game_rooms');

//监听游戏房间玩家信息更新情况:

      if (nowRoom.roomID != "" && G.inRoom == 1) {

        console.log("nowRoom.roomID",nowRoom.roomID);

        watcher1.where({

          _id: nowRoom.roomID

        }).watch({

          onChange: function(snapshot) {

           console.log('query result snapshot after the event'snapshot.docs);

          // 监听游戏房间数据:玩家1,玩家2,的信息,在此房间的游戏得分,剩余时间

  },

          onError: function (err) {

            console.error('the gameRoom watch1 closed because of error'err)

          }          

        });

      }


报错信息:

the gameRoom watch1 closed because of error <Error: errCode: -402012 realtime listener init ws fail | errMsg: errors of each retry (latest to oldest): ["[object Object]","TypeError: Cannot add property Map, object is not extensible","TypeError: Cannot add property Map, object is not extensible","TypeError: Cannot add property Map, object is not extensible","TypeError: Cannot add property Map, object is not extensible","TypeError: Cannot add property Map, object is not extensible"] history states: UNINIT-(close)->CLOSED>


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

1 个回答

  • 小太阳🌅win
    小太阳🌅win
    2021-09-14

    解决了吗。。

    2021-09-14
    有用
    回复
登录 后发表内容
问题标签