1***@qq.com
1***@qq.com
  • 发布:2020-04-10 20:34
  • 更新:2020-04-11 16:12
  • 阅读:867

【报Bug】uni.canvasToTempFilePath部分机型失效

分类:HBuilderX

报错如下:

20:24:45.019 TypeError: h.drawImageByCanvas is not a function  
20:24:45.040 at B.toDataURL (uniapp://ready:182:358852)  
20:24:45.060 at uniapp://ready:182:354351  
20:24:45.081 at Array.forEach (native)  
20:24:45.101 at uniapp://ready:182:354331  
20:24:45.122 at t.(anonymous function) (uniapp://ready:182:89683)  
20:24:45.143 at Object.subscribeHandler (uniapp://ready:182:1513)  
20:24:45.164 at Object.A [as subscribeHandler] (uniapp://ready:1:9075)  
20:24:45.210 webviewScriptError  
20:24:45.227 h.drawImageByCanvas is not a function  
20:24:45.247 TypeError: h.drawImageByCanvas is not a function  
20:24:45.268 at B.toDataURL (uniapp://ready:182:358852)  
20:24:45.289 at uniapp://ready:182:354351  
20:24:45.310 at Array.forEach (native)  
20:24:45.331 at uniapp://ready:182:354331  
20:24:45.352 at t.(anonymous function) (uniapp://ready:182:89683)  
20:24:45.373 at Object.subscribeHandler (uniapp://ready:182:1513)  
20:24:45.394 at Object.A [as subscribeHandler] (uniapp://ready:1:9075)  
20:24:45.436 Uncaught TypeError: h.drawImageByCanvas is not a function at uniapp://ready:182  
20:24:45.457 ===onError===webviewScriptError  
20:24:45.477 h.drawImageByCanvas is not a function  
20:24:45.498 TypeError: h.drawImageByCanvas is not a function  
20:24:45.519 at B.toDataURL (uniapp://ready:182:358852)  
20:24:45.539 at uniapp://ready:182:354351  
20:24:45.560 at Array.forEach (native)  
20:24:45.580 at uniapp://ready:182:354331  
20:24:45.601 at t.(anonymous function) (uniapp://ready:182:89683)  
20:24:45.621 at Object.subscribeHandler (uniapp://ready:182:1513)  
20:24:45.644 at Object.A [as subscribeHandler] (uniapp://ready:1:9075)

出现这个错误后,complete,success,fail都不会走,这个有没有什么办法捕获异常啊?我用try catc没用。

2020-04-10 20:34 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com (作者)

如何解决啊?

  • bs160799

    作者解决了没有 我也遇到了 请指教一下

    2020-06-03 19:10

该问题目前已经被锁定, 无法添加新回复