Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

394
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda