还是LZM
还是LZM
  • 发布:2024-03-06 16:54
  • 更新:2024-04-16 15:47
  • 阅读:193

【报Bug】使用add()时报错,Error: [zhjql]: SYSTEM_ERROR:Cannot read property 'reduce' of undefined

分类:uniCloud

产品分类: uniCloud/App

示例代码:

nupdata = {
myid: nordernum,
myname: "生产订单:" + pordernum + " - 工序质检",
pordernum: pordernum,
ntype: "工序质检",
yn:"0"
}
r.nupdata = nupdata;

    var norderres = await dbJQL.collection('my-qualityinspection').add(nupdata);  

报错:Error: [zhjql]: SYSTEM_ERROR:Cannot read property 'reduce' of undefined

我的程序没使用过‘reduce’, 不知道为什么会报这个错

操作步骤:

报错:Error: [zhjql]: SYSTEM_ERROR:Cannot read property 'reduce' of undefined

预期结果:

正常返回id

实际结果:

报错:Error: [zhjql]: SYSTEM_ERROR:Cannot read property 'reduce' of undefined

bug描述:

使用add()新增记录时报错:Error: [zhjql]: SYSTEM_ERROR:Cannot read property 'reduce' of undefined

我的程序没使用过‘reduce’, 不知道为什么会报这个错

2024-03-06 16:54 负责人:DCloud_uniCloud_CRL 分享
已邀请:
DCloud_uniCloud_CRL

DCloud_uniCloud_CRL

clientDB日志发一下。

还是LZM

还是LZM (作者) - 80后IT男

请求入参: {
"args": {
"rif": "mt3getcdata",
"msg": "小程序读取表信息",
"tablename": "my-warehouseallocation",
"tablenamearr": [
"my-warehouseallocation",
"uni-id-users",
"my-gaugeoutfit"
],
"field": [
"_id",
"myid",
"myname",
"company",
"yn",
"dateToString(add(new Date(0),create_date),\"%Y-%m-%d\",\"+0800\") as create_date_str",
"create_date",
"create_uid",
"ntype",
"pordernum",
"printcount",
"finishedproducts"
],
"pagesize": 5,
"userkeyarr": [],
"where": "(_id != null) && (yn == '1') && ntype in ['普通调拨']",
"cpage": 1,
"userwhere": "_id != null",
"clientInfo": {
"PLATFORM": "mp-weixin",
"OS": "ios",
"APPID": "UNIDE05E4F",
"DEVICEID": "16777364038064375252",
"scene": 1001,
"batteryLevel": 100,
"benchmarkLevel": -1,
"memorySize": 2048,
"safeArea": {
"top": 47,
"left": 0,
"right": 390,
"bottom": 810,
"width": 390,
"height": 763
},
"screenWidth": 390,
"screenHeight": 844,
"screenTop": 91,
"windowWidth": 390,
"windowHeight": 753,
"statusBarHeight": 47,
"enableDebug": false,
"fontSizeScaleFactor": 1,
"mode": "default",
"bluetoothEnabled": true,
"locationEnabled": true,
"wifiEnabled": true,
"locationReducedAccuracy": true,
"albumAuthorized": true,
"bluetoothAuthorized": true,
"cameraAuthorized": true,
"locationAuthorized": true,
"microphoneAuthorized": true,
"notificationAuthorized": true,
"notificationAlertAuthorized": true,
"notificationBadgeAuthorized": true,
"notificationSoundAuthorized": true,
"phoneCalendarAuthorized": true,
"deviceOrientation": "portrait",
"devicePixelRatio": 3,
"deviceId": "16777364038064375252",
"safeAreaInsets": {
"top": 47,
"left": 0,
"right": 0,
"bottom": 34
},
"appId": "UNIDE05E4F",
"appName": "chaoran_frontend-ERP-sc",
"appVersion": "1.0.0",
"appVersionCode": "100",
"appLanguage": "zh-Hans",
"uniCompileVersion": "4.06",
"uniRuntimeVersion": "4.06",
"uniPlatform": "mp-weixin",
"deviceBrand": "devtools",
"deviceModel": "iPhone 12/13 (Pro)",
"deviceType": "phone",
"osName": "ios",
"osVersion": "10.0.1",
"hostVersion": "8.0.5",
"hostLanguage": "zh-CN",
"hostName": "WeChat",
"hostSDKVersion": "2.33.0",
"hostFontSizeSetting": 16,
"windowTop": 0,
"windowBottom": 0,
"locale": "zh-Hans",
"LOCALE": "zh-Hans"
},
"uniIdToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI2MzY5Yzc3MDFlNGI2NjAwMDFkNzI1NzYiLCJyb2xlIjpbInByb2R1Y3Rpb25wZXJzb25uZWwiXSwicGVybWlzc2lvbiI6WyJhdXRob3JpdHlwcm9kdWN0aW9uZGVwYXJ0bWVudCJdLCJpYXQiOjE3MTI5OTY2MzMsImV4cCI6MTcxMzI1NTgzM30.9OMNrx0rUcP9gOjrXSACi5EfbOlZFVZsYxCaf52Mx08"
},
"requestId": "ac1cc3041713253498743183913"
}
[zhjql/ac1cc3041713253498743183913/2ms/DEBUG] event : { rif: 'mt3getcdata',
msg: '小程序读取表信息',
tablename: 'my-warehouseallocation',
tablenamearr: [ 'my-warehouseallocation', 'uni-id-users', 'my-gaugeoutfit' ],
field:
[ '_id',
'myid',
'myname',
'company',
'yn',
'dateToString(add(new Date(0),create_date),"%Y-%m-%d","+0800") as create_date_str',
'create_date',
'create_uid',
'ntype',
'pordernum',
'printcount',
'finishedproducts' ],
pagesize: 5,
userkeyarr: [],
where: '(_id != null) && (yn == \'1\') && ntype in [\'普通调拨\']',
cpage: 1,
userwhere: '_id != null',
uniIdToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI2MzY5Yzc3MDFlNGI2NjAwMDFkNzI1NzYiLCJyb2xlIjpbInByb2R1Y3Rpb25wZXJzb25uZWwiXSwicGVybWlzc2lvbiI6WyJhdXRob3JpdHlwcm9kdWN0aW9uZGVwYXJ0bWVudCJdLCJpYXQiOjE3MTI5OTY2MzMsImV4cCI6MTcxMzI1NTgzM30.9OMNrx0rUcP9gOjrXSACi5EfbOlZFVZsYxCaf52Mx08' }
[zhjql/ac1cc3041713253498743183913/56ms/ERROR] Cannot read property 'reduce' of undefined
TypeError: Cannot read property 'reduce' of undefined
at w (/tmp/function/@common_modules/uni-id-common/index.js:1:4496)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
[zhjql/ac1cc3041713253498743183913/57ms/ERROR] Cannot read property 'reduce' of undefined
Error: Cannot read property 'reduce' of undefined
at _callCloudFunction (/tmp/function/@common_modules/uni-cloud-jql/index.js:1:6206)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
请求响应状态: fail

要回复问题请先登录注册