Google Apps脚本网络应用中出现新的"currentURL未定义"错误

web*_*ath 8 web-applications google-apps-script

几天前,这开始出现在我的Google Apps脚本网络应用控制台中:

未捕获(在promise中)ReferenceError:current.cL未在then.catch.e中定义(content_script_bundle.js:13)

这可能是什么?

Gaz*_*zer 16

content_script_bundle.js可能是Chrome扩展程序中的脚本.Ghostery有这样一个js文件.基本上,它已经发现某种错误

window.console.error("Could not run content script", e, currentURL()) 
Run Code Online (Sandbox Code Playgroud)

不幸的是,脚本中将错误推送到控制台本身的行有一个小错误,currentURL因此没有被定义,所以它发出尖叫声.

只需关闭Ghostery或其他任何内容,错误就会消失.虽然,你可以忽略它.最简单的方法是右键单击控制台消息并选择"隐藏来自content_script_bundle.js的消息",如果它困扰您的话.如果是Ghostery,请将您的网站标记为可信,如下面的评论中所述.可能是最好的解决方案.

这是Chrome Inspector的屏幕截图.

在此输入图像描述

  • 您可以在Ghostery中将您的网站标记为受信任,并且错误消失 (3认同)