VM21:2 (in promise) MiniProgramError
Cannot read property 'createView' of undefined
TypeError: Cannot read property 'createView' of undefined
at t.value (eval at n.call.document (http://127.0.0.1:40184/remote-debug/runtime.js?devtools_ignore=true:1:11339), <anonymous>:2:2237101)
at t.value (eval at n.call.document (http://127.0.0.1:40184/remote-debug/runtime.js?devtools_ignore=true:1:11339), <anonymous>:2:1868186)
at A (eval at n.call.document (http://127.0.0.1:40184/remote-debug/runtime.js?devtools_ignore=true:1:11339), <anonymous>:2:1868352)
at t.value (eval at n.call.document (http://127.0.0.1:40184/remote-debug/runtime.js?devtools_ignore=true:1:11339), <anonymous>:2:1868463)
at eval (eval at n.call.document (http://127.0.0.1:40184/remote-debug/runtime.js?devtools_ignore=true:1:11339), <anonymous>:2:2566063)
at new Promise (<anonymous>)
at cc (eval at n.call.document (http://127.0.0.1:40184/remote-debug/runtime.js?devtools_ignore=true:1:11339), <anonymous>:2:2566025)
at eval (eval at n.call.document (http://127.0.0.1:40184/remote-debug/runtime.js?devtools_ignore=true:1:11339), <anonymous>:2:2567487)
at Array.forEach (<anonymous>)
at n (eval at n.call.document (http://127.0.0.1:40184/remote-debug/runtime.js?devtools_ignore=true:1:11339), <anonymous>:2:2567465)
errorReport @ VM21:2
runtime.js?devtools_ignore=true:1 [Violation] 'message' handler took 156ms
2022年5月28号开始,canvas大量出现createview undefined 问题的,导致线上手写签名功能不能用。开发工具可以,预览、真机、体验版、线上版 都不行,手写没反应
请问怎么进行调试呢
我也遇到这个问题了,开发工具能显示,但是预览的时候 除了图片部分 其他的能显示,真机调试的时候直接报错不能显示
真机模拟或者体验版的时候可以加一个这个force-use-old-canvas="true"
预览调试的时候这个会报错,去掉,设置false是没有用的哦
<ec-canvas id="mychart" canvas-id="mychart-bar" ec="{{ ec }}" force-use-old-canvas="true"></ec-canvas>
canvas2d 目前暂不支持真机,请使用预览调试