Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

393
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda