Applications Script Gadget on Google Site started throwing CORS errors

I have a Google site with several pages containing the Google Apps Script gadget. Users reported that a couple of months ago, Apps Script gadgets stopped working. I tested them and found that the Apps Script gadget loads correctly and displays content from the user interface service, however when I press any button that launches a function, the Apps Script gadget freezes and a console error in the browser shows

Uncaught SecurityError: Failed to read the 'frame' property from 'Window': Blocked a frame with origin "https://sites.google.com" from accessing a frame with origin "https://xxxxxxxxxxxxxxxx-a-sites-opensocial.googleusercontent.com". Protocols, domains, and ports must match. 

Has Google changed any security policies that prevent Cross Origin from generating requests for Script Scripts? Is there any workaround for this?

thanks

Stu

+8
javascript google-chrome cors google-apps-script google-sites
source share
1 answer

The only solution I could find in this problem was to replace the gadget with a link that opens the URL of the Script application on a new page.

0
source share

All Articles