We have a series of Google Sheets which contain data for our application, and we have written scripts behind each one to output that data in json format (as a download) which we then use. This is done by publishing each script as a web app, and then linking to the URL from an HTML dialog. The web apps looks something like this:
function doGet() { var exportJSON = getExportJSON(); var output = ContentService.createTextOutput(exportJSON); output.downloadAsFile("filename.json"); return output; } function getExportJSON() { var exportArray = []; fillInExportArray(exportArray); return JSON.stringify(exportArray, null, 4); } This has worked very well for a while, but on Wednesday (5th April 2017) it suddenly stopped working. What happens now is that the download dialog comes up, but where it used to put the filename (filename.json in my example) it now has the word "echo" (without the quotes). If I choose a location to download the file, and click ok the download appears in my download bar in Chrome, but it says "Failed - Network error" underneath it.
As I said we have a number of sheets which use the same pattern, but they are completely separate scripts and web apps. This problem appeared on all the sheets at the some time, without them being changed, so I'm assuming it's not something we've done.
update: I forgot to say that if I go into the script editor, and select Publish -> Deploy as web app, and then click the "latest code" link the download works fine.
update 2: I've just realised that this problem is happening for some of us in the office, but not others.