云开发真机调试(体验版)报错fail requestID 如何处理?
看了很多人的帖子都出现了这个问题,麻烦有没有微信技术小伙伴处理下?本地调试没有问题,但是真机(小米K20pro)调试以及上传体验版不行。
报错如下:<Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID , cloud function service error code -501000, error message Environment not found (callid 1608998695702-0.8170563143498757); at cloud.callFunction api; >
环境ID:myhouse-3gxttui672d66daf
云函数:updatehouse
const cloud = require('wx-server-sdk')
cloud.init({
env: cloud.DYNAMIC_CURRENT_ENV
})
const db = cloud.database()
const _ = db.command
function updatehouse(event) {
return db.collection('houseList').where({
key: event.key,
subKey: event.subKey
}).update({
data: {
flootContent: _.push(event.addhouse)
}
})
}
exports.main = async (event, context) => {
try{
let res = updatehouse(event)
return res;
} catch (e) {
return e
}
}