Google Apps脚本,脚本已完成但未返回任何内容 [英] Google Apps Script, script completed but did not return anything

查看:99
本文介绍了Google Apps脚本,脚本已完成但未返回任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我分享了一个应用程序,我正在处理有链接的任何人,但我无法以不同的用户身份访问该应用程序。

以下是应用链接: https://script.google.com/macros/s/AKfycbxjdyMyvIF8aYDBPurTi4VgVBP8PiiS76vh3mJXKCtFmljdmChK / exec
以下是我使用类似设置共享的示例应用链接: https://script.google.com/macros/s/AKfycbwTM_gkT62IqpKjG52ZMh6LWo-gBKZyfcpmrrqNavdiuC71KsNv/exec



应用程序部署设置:

  *执行应用程序:my_email@gmail.com 

谁有权访问应用程序:任何人

该应用程序使用ScriptDB。*

我的应用程序将如果最终无法公开访问,则无用。您的建议将非常感谢。

解决方案

问题在于 doGet 文档。您必须按以下方式更改 doGet 函数。

 函数doGet(e){
// ...
return html;
}


I've shared an App i'm working on with "Anyone who has the link", yet i can't access the app as a different user.

Here's the App link: https://script.google.com/macros/s/AKfycbxjdyMyvIF8aYDBPurTi4VgVBP8PiiS76vh3mJXKCtFmljdmChK/exec Here's a sample App link i shared with similar settings that worked: https://script.google.com/macros/s/AKfycbwTM_gkT62IqpKjG52ZMh6LWo-gBKZyfcpmrrqNavdiuC71KsNv/exec

App Deployment Settings:

*Execute the app as: my_email@gmail.com

Who has access to the app: Anyone

The app uses ScriptDB.*

My App will be useless if it can't be eventually accessed publicly. Your suggestions will be very much appreciated.

解决方案

The problem is that the doGet function in your code returns nothing and it should return a new app instance or HTML content, like in the Documentation. You have to change the doGet function in the following way.

function doGet(e){
  //...
  return html;
}

这篇关于Google Apps脚本,脚本已完成但未返回任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆