Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

397
Views
App script: google.run.script returns Uncaught error

I have two Google account organizations.

  1. I loged two "organization 1"
  2. Created new Spreadsheet
  3. Went to script editor
  4. Created these scripts:

code.gs

function myFunction() {
  var html = HtmlService.createHtmlOutputFromFile('dialog.html');
  SpreadsheetApp.getUi().showModalDialog(html, "test");
}

function test(){
  console.log("test");
}

dialog.html

<html>
  <head>
      <script>
      function run(){
      try{
        google.script.run.test();
      }
      catch(e){
        console.log("e: "+e)
      } 
      }
      </script>
    </head>
  <body onload='run()'>
   
  </body>
</html>

I ran myFunction() from new script editor. Everything worked fine.

After that I logged to my second organization and I did same steps. But in this case chrome returns me Uncaught error. I also tried to change project to GCP and read logs. Everytime I tried to call google.run.script.test(), I got this error to my gcloud logging:

Authorisation is required to perform that action.

So I assume this could be the issue. But I was not able to solve this after many hours of struggling.

Is there any organization or account settings which could affect using google.run.script?

Many thanks.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!