问题描述:
在开发工具中编译与运行都正常,但是代码上传时报错,原始错误如下:
message:Error: 系统错误,错误码:80058,error: invalid file : /app.json, json parse failed [20241218 22:51:37][wx01312a7e9dd8b08f]
appid: wx01312a7e9dd8b08f
openid: o6zAJs2B7YI9S3etaUbSTQ-8xJw8
ideVersion: 1.06.2405020
osType: win32-x64
time: 2024-12-18 22:51:42
自行排查情况:
按照错误信息所说,是app.json文件内容解析错误,于是我进行了以下排查:
1- 把json内容复制到其它工具中校验,显示格式是完全正确的。
2- 文件格式是utf8 without bom
app.json内容原文:
{
"pages": [
"pages/index/index",
"pages/pop/pop",
"pages/water/fetcher",
"pages/error/error",
"pages/order/order",
"pages/test/control",
"pages/coupon/receive",
"pages/order/callback",
"pages/oauth/wechat",
"pages/water_fetcher/register",
"pages/card_recharge/card_recharge",
"pages/service_charge/service_charge"
],
"subPackages": [],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"permission": {
"scope.userLocation": {
"desc": "小程序将获取站点位置"
}
},
"requiredPrivateInfos": [
"getLocation"
],
"usingComponents": {}
}
试了很多版本,回退使用老版本 1.06.2402040 后,终于把代码传上去了。