Google Drive Page Not Found - 很抱歉,此时无法打开该文件 [英] Google Drive Page Not Found - Sorry, unable to open the file at this time
问题描述
我正在使用谷歌脚本部署一个Web应用程序。我已经在同一个帐户中做了大约5-10次。当我尝试运行网络应用程序/脚本时,我现在得到了:标题和消息中的 Google云端硬盘:页面未找到
抱歉,此时无法打开文件。请检查地址并重试。
我发布了它作为所有者运行,但可以访问任何人,甚至是匿名的。
然后我试着用 doGet()创建一个新的小项目 code>方法返回一个小的静态网页,结果相同。
Code.gs:
函数doGet(e){
return HtmlService.createHtmlOutputFromFile('Test');
}
Test.html:
<!DOCTYPE html>
< html>
< head>
< base target =_ top>
< / head>
< body>
这是一项测试
< / body>
< / html>
我尝试在我的个人帐户中发布上述相同的电子表格/代码,并且工作正常。由于我已经有一些网络应用部署在发生错误的帐户中,因此每个帐户的网络应用数量是否有配额?
我尝试了不同的浏览器,不同的帐户,重新发布,然后注销并重新登录。相同的错误消息。 使用最新代码测试您的网络应用程序链接也失败。我可以直接调用IDE中的 doGet()
方法,它工作正常,我在日志中看到输出。
我没有在日志中看到页面未找到错误,这是我期望的页面没有找到 - 甚至没有进行代码执行,因此没有日志。
解决方案我想你是用两个Gmail帐户登录的:这就是为什么(/ u / 1,/ u / 0)可能已被添加到脚本地址(可能是一个bug)。
所以你需要做的是删除/ u / 0或任何附加。 / p>
ForExample:
$ b
https://script.google.com/macros/u/1/s/ffffsdds/exec 变成 https://script.google.com/macros/s/ffffsdds/exec
I'm using google scripts to deploy a web app. I've done about 5-10 in the same account. When I try and run the web app/script, I'm now getting: a "Google Drive: Page not found" in the title and the message
Sorry, unable to open the file at this time. Please check the address and try again.
I published it to run as the owner, but accessible to "Anyone, even anonymous".
I then tried creating a new small project with a doGet()
method that returns a small static web page, with the same result.
Code.gs:
function doGet(e) {
return HtmlService.createHtmlOutputFromFile('Test');
}
Test.html:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
This is a test
</body>
</html>
I tried publishing the same spreadsheet/code above in my personal account and it works fine. Since I already have some web apps deployed with the account that's having the error, is there a quota on the number of web apps per account?
I tried a different browser, a different account, re-publishing, and logging out and back in. Same error message. The "Test your web app with the latest code" link also fails. I can directly call the doGet()
method in the IDE and it works fine, and I see output in the logs.
I don't see anything in the logs for the page not found error, which is what I expect with the page not found - not even getting to code execution, thus no logs.
解决方案 I think you are logged in with two gmail account: That is why (/u/1,/u/0) may have been appended to script address (may be a bug).
So what you have to do is remove /u/0 or whatever is appended.
ForExample:
https://script.google.com/macros/u/1/s/ffffsdds/exec becomes https://script.google.com/macros/s/ffffsdds/exec
这篇关于Google Drive Page Not Found - 很抱歉,此时无法打开该文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!