小程序在初始化的时候,控制台提示错误:
<exception>
WASubContext.js?t=wechat&s=1681164127299&v=2.29.2:1 cloud init error: Error: operateWXData:fail
at fail (WASubContext.js?t=wechat&s=1681164127299&v=2.29.2:1)
at Function.fail (WAServiceMainContext.js?t=wechat&s=1681164127299&v=2.29.2:1)
at p (WAServiceMainContext.js?t=wechat&s=1681164127299&v=2.29.2:1)
at Object.fail (WAServiceMainContext.js?t=wechat&s=1681164127299&v=2.29.2:1)
at nu (WAServiceMainContext.js?t=wechat&s=1681164127299&v=2.29.2:1)
at ou (WAServiceMainContext.js?t=wechat&s=1681164127299&v=2.29.2:1)
at WAServiceMainContext.js?t=wechat&s=1681164127299&v=2.29.2:1
at s (WAServiceMainContext.js?t=wechat&s=1681164127299&v=2.29.2:1)
at VM16 asdebug.js:1(env: macOS,mp,1.06.2303220; lib: 2.29.2)
(anonymous)@WASubContext.js?t=we…64127299&v=2.29.2:1
Promise.catch (async)sendInitRequest@WASubContext.js?t=we…64127299&v=2.29.2:1
init@WASubContext.js?t=we…64127299&v=2.29.2:1
onLaunch@app.js? [sm]:35
(anonymous)@WASubContext.js?t=we…64127299&v=2.29.2:1
xe@WASubContext.js?t=we…64127299&v=2.29.2:1
(anonymous)@WASubContext.js?t=we…64127299&v=2.29.2:1
(anonymous)@WASubContext.js?t=we…64127299&v=2.29.2:1
(anonymous)@app.js? [sm]:4
I@WASubContext.js?t=we…64127299&v=2.29.2:1
(anonymous)@VM2100:7
doWhenAllScriptLoaded@VM2079:256
(anonymous)@VM2079:15
loadBabelModules@assubloader.js:1
async function (async)loadBabelModules@assubloader.js:1
window.loadBabelMod@VM2048:9
(anonymous)@slicedToArray.js:2
</exception>
查了很多网上资料,都没有可以参考的咨询。特求助于你们的技术支持。感谢!
wx.cloud.init 里面没有指定env吗,看你附的代码片段,是都注释掉了吧?