webstermath
webstermath

Reputation: 599

New "currentURL is not defined" Error in Google Apps Script Web Apps

A few days ago this started appearing in my Google Apps Script Web App Consoles:

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

What might this be?

Upvotes: 8

Views: 4000

Answers (1)

Gazzer
Gazzer

Reputation: 4646

content_script_bundle.js is likely a script within a Chrome Extension. Ghostery has such a js file. Basically, it has caught an error of some kind

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

Unfortunately, the line in the script that pushes the error to the console itself has a minor bug whereby currentURL has not been defined so it squawks.

Just turn off Ghostery or whatever and the error will disappear. Although, you can just ignore it. Easiest though is to right-click the console message and select "Hide messages from content_script_bundle.js" if it's bothering you. If it is Ghostery then mark your site as trusted as noted in the comment below. Probably the best solution.

This is a screenshot from Chrome Inspector.

enter image description here

Upvotes: 16

Related Questions