使用库的 Web 应用程序显示“抱歉,从存储读取时发生服务器错误”。某些用户收到错误代码 NOT_FOUND
相同的错误消息,与略有相似,我们很抱歉,从存储读取时发生服务器错误。错误代码 NOT_FOUND (简单的 onOpen 触发器从库调用函数),但就我而言,我有一个 Web 应用程序。 最佳答案中的解决方案(使用版本而不是头部部署)并不适用,因为我的网络应用程序是已设置为使用库版本。对库进行轻微更改后,问题出现了。
- 网络应用程序运行良好,但我需要进行更改。
- 我的网络应用使用全局变量来处理多个设置。
- 我对库进行了更改并创建了新版本
- 这一变化是将文字字符串从一个数组移动到另一个数组。
- 我在网络应用程序中更新了库版本号。
- 该网络应用程序适用于我的帐户,但不适用于其他帐户。
- 我查看了清单中的库版本号,一切正常。
- 使用以前的库版本工作正常
该网络应用程序使用 Google Cloud 标准项目,设置仅供内部使用。该库由其他 Google Apps 脚本项目使用。它有多个命名空间 (var myNamespace = ((ns) => { /** some stuff here */ return ns})({})
) 其中大多数都专注于使用单个服务(FormApp、SpreadsheetApp、DriveApp),但只有少数用于 Web 应用程序。
我无法重现该问题,因此我认为这与特定项目有关。禁用 V8 意味着太多的工作,即我使用了很多 const
、 let
、箭头函数和旧运行时不支持的其他东西。
Same error message and slightly similar to We're sorry, a server error occurred while reading from storage. Error code NOT_FOUND (simple onOpen trigger calling functions from a library), but in my case I had a web application. The solution from the top answer, to use a version instead of the head deployment, doesn't apply as my web app was already set to use a library version. The problem appeared after doing a slight change to the library.
- The web app was working fine, but I was required to make a change.
- My web app uses global variables to handle several settings.
- I made a change to the library and created a new version
- The change was moving a literal string from one array to another array.
- I updated the library version number in the web app.
- The web app works fine for my account but not for other accounts
- I reviewed the library version number in the manifest, it was OK.
- Using previous library versions works fine
The web app uses a Google Cloud Standard Project, set for internal use only. The library is used by other Google Apps Script projects. It has multiple namespaces (var myNamespace = ((ns) => { /** some stuff here */ return ns})({})
) most of them are focused on using a single service (FormApp, SpreadsheetApp, DriveApp), but only few are used on the web app.
I wasn't able to reproduce the problem, so I think that it's related to the specific projects. Disabling V8 implies too much work i.e. I used a lot const
, let
, arrow functions and other stuff unsupported by the old runtime.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
两种解决方法解决了该问题,但没有一个是“完美的”。
第一个的主要问题是我必须使用相同的内容更新其他项目库,后者的主要问题是新部署有不同的 URL,我必须通知 Web 应用程序用户新的 URL,他们可能必须更改他们的书签/更新他们的注释。
最后,我决定使用第二个,因为还有其他项目依赖该库来共享通过库
PropertiesService.getScriptProperties()
共享的解决方案设置。Two workarounds solved the problem, none of them are "perfect".
The main problem with the first is that I had to update other projects using the same library, the main problem with the later is that the new deployment has a different URL I had to notify the web app users the new URL, the might have to change their bookmarks / update their notes.
Finally I decided to use the second because there are other projects relaying on the library for sharing solutions settings shared through the library
PropertiesService.getScriptProperties()
.