 <p>Try to comment the line, where it is pointing out and check if the error is really with this function or not. You can also use debugger and <a href="https://developers.google.com/apps-script/troubleshooting#execution_transcript" rel="nofollow">execution transcript</a> to figure out the issue. Also try to search it <a href="https://code.google.com/p/google-apps-script-issues/issues/list" rel="nofollow">here</a>. I saw many ticket issue about your problem.</p>