2

I made a webapp in apps script google. I deployed it with "Execute the app as:" => 'Me', and "Who has access to the app:" => 'Anyone, even anonymous'

Everything worked well till 2 two days ago.

Since, I have this error message (in french) when my users launch the webapp.


Google Docs encountered an error. Please try reloading this page, or coming back to it in a few minutes. To learn more about the Google Docs editors, please visit our help center.

We're sorry for the inconvenience.

  • The Google Docs Team

when I launch under my google account, it works fine.

I saw, in my sheet that the process run well, until the "evaluate" method.

This is my code

    /////////////////////////
function doGet(e) {

   var valeur = new Array();    
   valeur[0]=e.parameter.Yerk;//action
   valeur[1]=e.parameter.PSO; // Pso
   valeur[2]=e.parameter.Clef; // clé
   if (valeur[2] != null ){
       var today = new Date();
       valeur[3] = today.toISOString().substr(0, 10); //date jour
        Logger.log("v1 de vlé=> "+valeur[2]);
       }
       else
       { valeur[3] ='';
       Logger.log("v2 de clé=> "+valeur[2]);}
       
    valeur[4]="Ici apparaitra la séance faite ou à refaire si vous cliquez sur le bouton ⏩ Planning entrainement ⏪";
    valeur[5]="Ici apparaitra la séance suivante si vous cliquez sur le bouton ⏩ Planning entrainement ⏪";
    valeur[6]=0;
       
   Logger.log(e.parameter);
   Logger.log(e.parameters);
  var ecran = HtmlService.createTemplateFromFile('page');

// Si pas de parametre (PSO) on charge tout le monde
// le test se fait aussi dans la page HTML
   if (valeur[0]!='ongigo')
        {valeur=valeur.concat(cherche_athlete());}
   else
        {
        //Logger.log("Valeur 1,3,2 =>  "+valeur[1]+", "+valeur[3]+", "+valeur[2]);
        var planif_init=historique([valeur[1],valeur[2],valeur[3]]) ; //pso //clé //date 
         // On le met valeur qui détermine le placement avec la date = new date
        valeur[6]=planif_init[0][2];
        if (valeur[6]!=0) {
              valeur[4]=planif_init[0][0];
              valeur[5]=planif_init[0][1];               
            }        
             else{
                 for (var i = 1 ; i < 11 ; i++)  
                    {  for (var j = 0 ; j<3 ; j++) {planif_init[i][j]=i;}    } 
            }
          }
   
   Logger.log(id_Les_jours_Billat+" =>Valeur : "+ valeur +" :!!! Valeur<= "+ ZOZO); 
  ecran.data = valeur; // = cherche dans const id_Les_jours_Billat
  ecran.planif=planif_init;
        
  return ecran.evaluate().setFaviconUrl('https://i.postimg.cc/8z0thNcT/Pingouin-burned-removebg-preview.png');
 
    

//  return HtmlService.createTemplateFromFile("page").evaluate();  
}



// Pour inclure les fichier JS et CSS dans l'HTML
function include(fichier) {
  return HtmlService.createHtmlOutputFromFile(fichier).getContent();  
}
//Fin include

///////////////////////////////////////////////////////////////////////////////  Fin page HTML

Have you an idea where I can search the issue ?

Do you know if they are limitations for user "anonymous". (This morning One user succeed to launch without google error, but nobody else)

I also copy the project and créate another webapp, with same result... :-(

Thanks for attention, I am ready for test if you have an idea...

L'PM

Marios
  • 26,333
  • 8
  • 32
  • 52
Papy_Fred
  • 21
  • 2
  • 1
    Does this answer your question? [Google Script App Fails in Incognito Mode](https://stackoverflow.com/questions/62770318/google-script-app-fails-in-incognito-mode) – TheMaster Jul 08 '20 at 08:47

1 Answers1

1

This is a known issue and Google has acknowledged the bug. If you are logged into any Google account, the web app would work but if you try in incognito mode, the app would return a 500 error.

You can follow the issue tracker for updates.

Amit Agarwal
  • 10,910
  • 1
  • 32
  • 43