微信开发者工具v1.02.1911180 最新版本,
由于camera不支持微信开发者工具调试,所以使用真机调试,手机安装的微信版本7.0.11
在引入插件中调用createOffscreenCanvas接口报2个异常错误
canvas: wx.createOffscreenCanvas()
2个异常报错的信息如下:
appServiceSDKScriptError (unknown)
Pt.default.OffscreenCanvas is not a constructor; at wx.createOffscreenCanvas
TypeError: Pt.default.OffscreenCanvas is not a constructor
at Vt (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:809537)
at Object.Wt (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:808231)
at Object.f.(anonymous function) (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:888622)
at Object.eval (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:587283)
at Function.eval (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:1401835)
at Object.eval (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:541980)
at pe.onLaunch (weapp:///app.js:15:18)
at pe.eval (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:1649604)
at new pe (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:1650360)
at Function.eval (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:1650774)
thirdScriptError (unknown)
Cannot assign to read only property 'btoa' of object '[object Window]';at App lifeCycleMethod onLaunch function
TypeError: Cannot assign to read only property 'btoa' of object '[object Window]'
at e ([__wxPluginCode__]:1095:45)
at Object.exports.setupWechatPlatform ([__wxPluginCode__]:1095:1483)
at Object.exports.configPlugin ([__wxPluginCode__]:1071:148)
at pe.onLaunch (weapp:///app.js:9:12)
at pe.eval (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:1649604)
at new pe (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:1650360)
at Function.eval (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:1650774)
at eval (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:1637680)
at eval (weapp:///app.js:7:1)
at require (eval at n.call.document (http://127.0.0.1:63151/remote-debug/runtime.js?devtools_ignore=true:1:8753), <anonymous>:2:1685185)
canvas2D不支持真机调试
那只能通过发布版本后来测试吗?
手机型号华为P30