【发布时间】:2021-12-31 15:39:10
【问题描述】:
编辑:我为这个问题创建了一个谷歌错误https://issuetracker.google.com/issues/210205631
这是对情况的总结:
| Topic | Comment |
|---|---|
| Issue | Not being able to access /dev of a project. Browser console shows 404 Not Found |
| Worked before? | Worked for months |
| Caused by a user-initiated change? | To my knowledge, there was no change to the code nor settings of the project. There is no other accessing the code of the project. Not sure if some change happened to the spreadsheet |
| Project location | The project's container is a spreadsheet |
| Project type | GCP default |
| Deployed | Execute as me + Who has access anyone |
| Permission | I am not the owner of the spreadsheet. I am able to edit and share the spreadsheet. The owner holds @gmail.com type of account. The owner is not able to access /dev either |
| Script role | My role in the script setting is an editor |
| New deployments | I am able to create new deployments. New and existing deployments can be access by their URLs. But /dev
|
| Multiple accounts | I am NOT logged into multiple accounts |
| Browsers | Tested on latest versions f 5 major browsers |
| Copy script | When I make a copy of the script, I get the same result as above |
| Tested on | The above applies to my google.com and my legacy free GSuite account. Tested also in incognito mode. Tested by logging into google account that got edit access to the spreadsheet then script editor was opened from the spreadsheet and /dev access from the editor |
| Copy spreadsheet | When I make a copy of the original spreadsheet I am able to access /dev
|
我有一个网络 GAS 项目在生产中工作了几个月。现在实际应用程序的用户报告了一个错误。我去调查它并想打开测试部署但收到了
“抱歉,目前无法打开文件。”
详情
该项目已绑定到 Google 电子表格。我不是 GAS 代码所附的 Google 电子表格的所有者。我从来没有。
我已采取的故障排除步骤:
我在 Firefox、Edge、Vivaldi 和 Chrome 上测试了这个问题。最新版本的浏览器并重新启动了我的计算机。我能够在 Gmail 帐户 和 旧版 GSuite 帐户上重现该问题。我没有登录了多个 Google 帐户。 Gmail 帐户返回此开发 URL:https://script.google.com/macros/s/<deploymentId>/dev。 GSuite 帐户返回此开发 URL:https://script.google.com/a/macros/<domain>/s/<deploymentId>/dev
我创建了 Google 脚本的副本并对其进行了修改,以便它可以访问原始电子表格。部署时收到此错误消息
“只有与脚本同域的用户才能部署此脚本。”
我不是新脚本的所有者。我的角色是editor。我无法在我的 GSuite 帐户下进行部署。所有者正在使用 Gmail。我可以在我的 Gmail 帐户下创建新部署,但我无法访问测试环境:
脚本所有者拥有与我相同的/dev URL,并且收到相同的错误。
这个问题是自给自足的,但我让short video 表明/dev(测试环境)端点不可访问并抛出此错误,但版本化部署(/exec)是可访问的。
【问题讨论】:
-
不要添加“更新”,编辑您的帖子,使其成为编辑时可能的最佳演示文稿。不要指望我们观看视频或阅读其他页面;把所有需要的东西都放在你的帖子里;使用文字和绝对必要的图像(not images of text)(或 gifs)。 How to Ask minimal reproducible example 使用足够多的单词、句子和对部分示例的引用来清楚完整地表达你的意思。 Help center
-
在相关的说明中,我记得不久前与我的一个客户的类似问题。类似的设置(继承):绑定脚本,部署为 webapp,拥有一个 gmail 帐户,同样的错误。如果问题仍然存在,我稍后会看看我的笔记
-
尝试创建电子表格本身的副本。它应该包含您的脚本项目的副本。如果您制作容器的副本,您可能会成为脚本的所有者。
-
我为此issuetracker.google.com/issues/207485323创建了问题跟踪器
-
@Radek 考虑使用该链接添加答案。如果它只是一个链接的答案,它可能会被删除。所以,解释一下我们已经在 cmets 中讨论过的一些变通方法。
标签: google-apps-script deployment permissions google-workspace