最近两天接连收到这个报错报警,看样子不是我代码的啊。
TypeError
line:4955,column:6559,TypeError: Function("r","regeneratorRuntime = r") is not a function. (In \'Function("r","regeneratorRuntime = r")(n)\', \'Function("r","regeneratorRuntime = r")\' is undefined) Stack:https://usr/app-service.js:4955:6559
n@https://usr/app-service.js:4932:156
https://usr/app-service.js:4955:6595
n@https://usr/app-service.js:4932:156
https://usr/app-service.js:4961:111
n@https://usr/app-service.js:4932:156
https://usr/app-service.js:5096:492
n@https://usr/app-service.js:4932:156
https://usr/app-service.js:5096:431
n@https://usr/app-service.js:4932:156
https://usr/app-service.js:4932:1351
https://usr/app-service.js:5096:66
h@https://lib/WASubContext.js:2:1623200
https://usr/app-service.js:5097:17
f@https://lib/WASubContext.js:2:1622646
https://lib/WASubContext.js:2:1623600
global code@https://usr/app-service.js:5197:15
value@https://lib/WAServiceMainContext.js:2:137847
https://lib/WAServiceMainContext.js:2:139885
https://lib/WAServiceMainContext.js:2:135476
https://lib/WAServiceMainContext.js:2:225147
https://lib/WAServiceMainContext.js:2:224099
https://lib/WAServiceMainContext.js:2:224063
https://lib/WAServiceMainContext.js:2:225147
y@https://lib/WAServiceMainContext.js:2:77600
2021-03-09 11:42:44
客户端版本:7.0.10
基础库版本:2.10.4
机型:iPhone 8 Plus (GSM+CDMA)<iPhone10;2>
wx87f43b1820b0178d
基础库低于等于2.10.4会有这个问题。
2个办法:
1、使用终端升级微信版本。
2、如果是用了这个库https://www.npmjs.com/package/regenerator-runtime造成,把runtime.js里的出错的那句代码Function("r", "regeneratorRuntime = r")(runtime);注释掉;如果是其他库,sourcemap定位到出错的地方试试注释掉是否可以。
打开增强编译。
神秘报错越来越多了
错误样例: Cannot read property 'onLoad' of undefined
错误样例: TypeError: Function(...) is not a function
我这也出现这个问题了
客户端版本:7.0.8
基础库版本:2.9.5
机型:iPhone 5
wx8e3d27a3c0b4679b