Javascript 应用程序脚本执行API“;“发生网络错误”;在Firefox中
Google Apps脚本执行API中存在以下问题或bug(?) Firefox中的错误“出现网络错误,请求无法完成。”(执行约1分钟后) Chrome,IE,Safari返回结果值“ok”(不考虑时间) 如何修复它?谢谢Javascript 应用程序脚本执行API“;“发生网络错误”;在Firefox中,javascript,google-apps-script,google-drive-api,Javascript,Google Apps Script,Google Drive Api,Google Apps脚本执行API中存在以下问题或bug(?) Firefox中的错误“出现网络错误,请求无法完成。”(执行约1分钟后) Chrome,IE,Safari返回结果值“ok”(不考虑时间) 如何修复它?谢谢 //apps script part function getAction(){ var result={}; Utilities.sleep(1000*120); //wait 2~ minutes result['value']='ok'; return
//apps script part
function getAction(){
var result={};
Utilities.sleep(1000*120); //wait 2~ minutes
result['value']='ok';
return result;
}
//client javascript part
var payload ={'test':'a'}
var request = {
'function': 'getAction',
'parameters': [payload],
'devMode': true
};
var scriptId='your script ID';
var op = gapi.client.request({
'root': 'https://script.googleapis.com',
'path': 'v1/scripts/' + scriptId + ':run',
'method': 'POST',
'body': request
});
op.execute(function(resp){
//Error in Firefox "A network error occurred and the request could not be completed." (after about 1 minute)
//Chrome, IE, Safari return the result value "ok" (regardless of the time)
});
这就是全部密码吗?你能解释一下你想做什么吗?失败的功能是什么?如何复制?这就是全部代码吗?你能解释一下你想做什么吗?失败的功能是什么?如何繁殖?