【问题标题】:New "currentURL is not defined" Error in Google Apps Script Web AppsGoogle Apps Script Web Apps 中出现新的“currentURL is not defined”错误
【发布时间】:2018-11-28 19:58:01
【问题描述】:

几天前,这开始出现在我的 Google Apps Script Web App Consoles 中:

Uncaught (in promise) ReferenceError: currentURL is not defined at then.catch.e (content_script_bundle.js:13)

这可能是什么?

【问题讨论】:

  • 只是一堆缩小的脚本。

标签: google-apps-script web-applications


【解决方案1】:

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

window.console.error("Could not run content script", e, currentURL()) 

不幸的是,脚本中将错误推送到控制台本身的行有一个小错误,即 currentURL 尚未定义,因此它会发出声音。

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

这是来自 Chrome Inspector 的屏幕截图。

【讨论】:

  • 您可以在 Ghostery 中将您的网站标记为受信任,然后错误就会消失
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-01-16
  • 2015-11-11
  • 1970-01-01
相关资源
最近更新 更多