Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/392.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript html2canvas错误:未找到记录器实例_Javascript_Html_Html2canvas - Fatal编程技术网

Javascript html2canvas错误:未找到记录器实例

Javascript html2canvas错误:未找到记录器实例,javascript,html,html2canvas,Javascript,Html,Html2canvas,我使用html2canvas进行渲染,当我一遍又一遍地渲染完全相同的东西时,我似乎只有大约5%的时间会出现这种错误。为什么我会得到这个错误,为什么它是零星的 html2canvas.js:2396 Uncaught (in promise) Error: No logger instance found with id 170ae84309d at Function.Logger.getInstance (html2canvas.js:2396) at html2canvas.j

我使用html2canvas进行渲染,当我一遍又一遍地渲染完全相同的东西时,我似乎只有大约5%的时间会出现这种错误。为什么我会得到这个错误,为什么它是零星的

html2canvas.js:2396 Uncaught (in promise) Error: No logger instance found with id 170ae84309d
    at Function.Logger.getInstance (html2canvas.js:2396)
    at html2canvas.js:7003
    at step (html2canvas.js:83)
    at Object.next (html2canvas.js:64)
    at fulfilled (html2canvas.js:54)
Logger.getInstance  @   html2canvas.js:2396
我循环浏览div集合,并使用此函数渲染所需的图像:

html2canvas(document.querySelector('#'+img.element_id), {dpi:300, scale: 2}).then(canvas => {      
  this[img.name] = canvas.toDataURL('image/jpeg',1.0);
});

检查html2canvas.js文件时发现一个destroy函数,该函数一定是提前启动的,并且该实例在程序完成之前被删除。有一次我评论了这个函数,所有的东西都在100%的时间里完美地工作

//Logger.destroy(instanceName);