Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

doGet is not called with "state" parameter name, got server error

since few days, when I try to invoke all scripts as service with parameter "state", I receive a strange "Google Docs has encountered a server error", method doGet is not ever called!

Please, can you confirm that something is changed?

Steps to reproduce the problem:

  1. Create a simple apps script with only getMethod

        function doGet(e) {
          Logger.log("doGet");
          MailApp.sendEmail("[email protected]", "Log", Logger.getLog());
    
    
    
      var app = UiApp.createApplication();
    
      return app;
    }
    
  2. Publish the service

  3. Invoke the script from browser passing "state" parameter

    https://sites.google.com/macros/exec?service=AKfycbwrrSzd5PM07HgmuOSE1UsXxO9MmGTEOEwvXQC1&state=sample_parameter

  4. The server returns error:

        Google Docs has encountered a server error. If reloading the page doesn't help, please contact us.
    
    
    To discuss this or other issues, visit the Google Docs Help forum. To see the list of known problems, check the Google Docs Known Issues page.
    
    Sorry, and thanks for your help!
    - The Google Docs Team
    

I've also opened issue

Thanks all, Francesco

EDIT: Issue has been fixed! Thanks all.

like image 406
Francesco Carlucci Avatar asked Nov 04 '22 23:11

Francesco Carlucci


1 Answers

Creating the issue report was the right thing to do. But note that this will probably not be "fixed" in the way you want. They will probably just include in the documentation that you can not use a parameter named "state".

The solution is just to use a different name, e.g. myState or something else. Not very annoying or difficult to do IMHO.

like image 103
Henrique G. Abreu Avatar answered Nov 14 '22 23:11

Henrique G. Abreu