0

I just noticed that it’s not even my code that causes the error — classic Google Sites page on load is throwing that error. I tried in incognito mode and I still get an error on any page load.

I am facing an issue when I embed a Google apps script in Google Site. It gives me the below error message:

error

I do not get this error message when I create the Google Apps script and publish it as web application. I have checked all scripts and I can't seem to notice any error.

Edit: Tried with simple code.gs file which has these details:

function doGet() {

  return HtmlService.createTemplateFromFile('test')
      .evaluate()
      .setSandboxMode(HtmlService.SandboxMode.IFRAME);

}

function include(filename) {

  return HtmlService.createHtmlOutputFromFile(filename)
      .getContent();

}

In test.html file:

<!DOCTYPE html>
<html>

  <head>

    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <?!= include('stylesheet'); ?>

  </head>

  <body>  

  </body>

</html>
  • Try using your browser in incognito mode with all the extensions disabled. if the error persist add more details about what your script does and the version of Google Sites that you are using and Ife page have other widgets – Rubén Jan 5 at 20:27
  • Just added sample code which when embedded in Google Sites still gives an error – user5711693 Jan 5 at 20:52
  • 1
    I just noticed that its not even my code that causes the error - classic Google Sites page on load is throwing that error..tried incognito mode and I still get an error on any page load.. – user5711693 Jan 5 at 21:27
  • I created a new site using the basic template but it doesn't throw the error message shown. What site theme is your site using? What page template is used on the page that throws the error? Are you using Google Analytics or a custom search engine on your site? – Rubén Jan 5 at 22:45

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.