it is getting me crazy, the code was working yesterday, but not anymore. I tried to check all syntax again, but the issue still persists. this server-side request from google sh
I bumped into this issue some time ago and it also nearly drove me mad (oh, the joys of loosely-typed JS!). The problem is that you are trying to return an unacceptable type of data to client-side. Functions called via google.script.run
have restrictions on what they can return (for example, you should avoid Date
instances).
Restricted types
Currently, you can't return (take a look at the documentation for detailed explanation of restrictions):
Date
instances;Function
;DOM
elements (though form
is permitted);Solution
Changing ary[1]= new Date(r[0]);
to ary[1] = r[0];
should do the trick, simply move Date
parsing to the client.