JSError
Overview
Error type trends
POST /jserror/jserror-trend
Request parameters | Type | Required parameters | Description |
---|---|---|---|
mpId | Number | is | Mini Program ID |
timePeriod | Number | No | The parameter defaults to 30 minutes |
endTime | String | No | End time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39) |
Return results: (general return results for Highcharts charts)
JS error type list
POST /jserror/type-list
Request parameters | Type | Required parameters | Description |
---|---|---|---|
mpId | Number | is | Mini Program ID |
timePeriod | Number | No | The parameter defaults to 30 minutes |
endTime | String | No | End time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39) |
Return results:
[{
"errorMessage": "ReferenceError: i is not defined", // Error type
"errorPv": 4,
"minTime": 1545120000000, // The earliest error occurrence time
"maxTime": 1545123540000, // Latest error occurrence time
"errorRatio": 6.67,
"wechatVersion": "6.6.3" //WeChat version
},
...]
Details
Error number trend
POST /jserror/jserror-type-count
Request parameters | Type | Required parameters | Description |
---|---|---|---|
mpId | Number | is | Mini Program ID |
jsError | String | is | JS type |
timePeriod | Number | No | The parameter defaults to 30 minutes |
endTime | String | No | End time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39) |
Return results: (general return results for Highcharts charts)
JS error tracking
TOP5 dimension indicator pie chart
POST /jserror/pie
dimension option list:
name | dimension |
---|---|
networkType | networkType |
WeChat version | wechatVersion |
Region and Carrier | regionId,carrierId |
System version | system |
Device | deviceType |
page | path |
Request parameters:
Request parameters | Type | Required parameters | Description |
---|---|---|---|
mpId | Number | is | Mini Program ID |
dimensionType | String | is the | dimension key, which distinguishes the pie chart type, refer to the dimension option list |
timePeriod | Number | No | The parameter defaults to 30 minutes |
endTime | String | No | End time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39) |
jsError | String | is | js type |
Return results:
[
{
"name": "2G",
"value": 1,
"dimension": {
"networkType": "2G"
}
},
...
{
"name": "Other", // Data records outside top5, no dimension item
"value": 10
}
]
JS error list
POST /abnormal/jserror/list
Content-Type: application/json
Request example:
{
"timePeriod": 30,
"endTime": "",
"mpId": 111,
"jsError": "xxx",
"filter": [
{
"dimension": "ip",
"values": ["192.168.1.100", "192.168.1.111"],
"searchValue": "192.168.1"
},
{
"dimension": "regionId,carrierId",
"values": ["4811,12000", "4811,12000"]
}
...
]
}
Return data:
[
{
"timestamp": "2019-11-27 15:16",
"id": "Y5G4q24Bw-wCxOz_N0tj",
"agentVersion": "1.3.6",
"applicationId": 0,
"carrierId": 0,
"cityId": 0,
"countryId": 0,
"instanceId": 0,
"mpId": 2065,
"errorMessage": "Random js error",
"ip": "192.168.5.149",
"deviceType": "Nexus 5",
"messageType": "JSERROR",
"networkType": "wifi",
"msgErrorPv": 1,
"occurTime": 1574839003087,
"openPath": "pages/index/index",
"path": "pages/index/index",
"pageTraceId": "f613a6ea8fd64ce1bee96d6f2b4d59e1",
"regionId": 0,
"sid": "48cac7ec-7a22-48b0-bc5f-93c3e957abef",
"uid": "5847de28-2b35-4d6e-b977-ff54a685c7d4",
"scene": "1001",
"system": "Android 5.0",
"wechatVersion": "7.0.4",
"trace": false
},
...
]
JS error trace details
JS error trace details
POST /abnormal/jserror/detail
Request parameters | Type | Required parameters | Description |
---|---|---|---|
mpId | Number | is | Mini Program ID |
traceId | String | No | When specifying traceId, only query this trace |
pageNo | Number | No | Page number, starting from 1 |
pageSize | Number | No | Check one item at a time |
minTime | Number | is | start time |
maxTime | Number | is | End Time |
path | String | No | path |
wechatVersion | String | No | wechatVersion |
jsErrorType | String | No | jsErrorType |
networkType | String | No | Network Request |
countryId | Number | No | |
regionId | Number | No | |
cityId | Number | No | |
carrierId | Number | No |
Return results:
[
{
"traceId": "xxxxx",
"timestamp": "2019-11-27 15:16",
"path": "pages/index/index",
"wechatVersion": "7.0.4",
"sdkVersion": "2.9.3",
"system": "Android 5.0",
"deviceType": "Nexus 5",
"networkType": "wifi",
"width": "360",
"height": "518",
"region": "unknown",
"city": "Unknown",
"carrier": "unknown",
"ip": "192.168.5.149",
"ua": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Mobile Safari/537.36 wechatdevtools/1.02.1910120 MicroMessenger/7.0.4 webview/ ",
"time": "2019-11-27 15:16",
"msg": "xxxx",
"lineno": 0,
"colno": 0,
"stack": "thirdScriptError\nRandom js error;at \"pages/index/index\" page lifeCycleMethod onShow function\nError: Random js error\n at _e.onShow (http://127.0.0.1:13201/appservice/ pages/index/index.js:99:13)\n at _e.onShow (http://127.0.0.1:13201/appservice/agent/bundle.js:75:25)\n at _e.<anonymous> ( http://127.0.0.1:13201/appservice/__dev__/WAService.js:1:1531191)\n at _e.p.__callPageLifeTime__ (http://127.0.0.1:13201/appservice/__dev__/WAService.js:1 :1530936)\n at http://127.0.0.1:13201/appservice/__dev__/WAService.js:1:1549262\n at xt (http://127.0.0.1:13201/appservice/__dev__/WAService.js: 1:1549407)\n at Function.<anonymous> (http://127.0.0.1:13201/appservice/__dev__/WAService.js:1:1553690)\n at i.<anonymous> (http://127.0. 0.1:13201/appservice/__dev__/WAService.js:1:1522455)\n at i.emit (http://127.0.0.1:13201/appservice/__dev__/WAService.js:1:551893)\n at Object. emit (http://127.0.0.1:13201/appservice/__dev__/WAService.js:1:539354)",
"uid": "5847de28-2b35-4d6e-b977-ff54a685c7d4"
}
]