tazz_ben
tazz_ben

Reputation: 279

Formerly Working Code that Calls google.script.run. Failing

Something changed this afternoon that broke all of my Google App Scripts that are deployed as web apps. At the moment every call to:

google.script.run.[anything]

from the interface (HTML side) to backend fails. If you go to something like Chrome's console it says the following:

Uncaught TypeError: Cannot read property 'run' of undefined

Firefox's developer tools are a little more explicit:

TypeError: google.script is undefined

So somehow google.script is no longer defined. Is this a bug Google introduced? Do we now need to call a script to get these methods (in the way we need to call https://apis.google.com/js/api.js?onload=onApiLoad for other features)?

Thanks!

Upvotes: 1

Views: 174

Answers (1)

Amit Agarwal
Amit Agarwal

Reputation: 11278

Please see workaround. You need to load the Google File Picker using the Google API Loader library.

Upvotes: 1

Related Questions