I've been working with my apps embedded on our Site for a while without any inconvenience when suddenly they stopped working...
From what I've been able to troubleshoot, the calls I do to my scripts using google.script.run from the Javascript code within the HTML don't go through anymore... Whenever it tries to execute the code I get the following alert through a withFailureHandler(alert):
NetworkError: Connection Failure due to HTTP 405
This is happening on all our apps throughout our Site.
Where it really gets fishy is that the scripts work fine if they are not embedded on the site and also the first time you save the page with an embedded app on it (after refreshing the page it stops working again)...
Here you can check some examples of two apps:
With user Authorization
- Embedded on a Site: https://sites.google.com/a/maddingcrowd.cc/madding-crowd/pitches/love-experiments?pli=1
- Without Embedding: https://sites.google.com/macros/exec?service=AKfycbxWKsA6OA-pKeVFE_O0kL_UyRb-CTQSG2Ny6ahtscnLhwetzV4s&id=5
Without user Authorization
- Embedded on a Site: https://sites.google.com/a/maddingcrowd.cc/madding-crowd/create?pli=1
- Without Embedding: https://script.google.com/macros/s/AKfycbyBmzz9y0OkiLWCPhAOqbgtAUL7IE3fWPh43urwAGltrGzq5E7V/exec
What happened? We are actually working with this on a daily basis and need to get a stable version out... I would greatly appreciate any help!
EDIT:
I just found out this error comes from the Google Universal Login we were using: https://www.google.com/a/UniversalLogin?service=jotspot&continue=http://sites.google.com/a/maddingcrowd.cc/madding-crowd/pitches/love-experiments
It automatically adds the
?pli=1
to the end of the URL and this little squeezer provokes the error to pop out...
Does anyone know the reason? Or why this piece of string gets added to the end? We added the universal Login since the Apps can't be seen if you are not already logged in with your google account