Can NOT authorize calling Script for new ScriptDb when Included Library remains from previously deleted ScriptDb.

寵の児 提交于 2021-01-28 05:53:47

问题


I deleted a ScriptDb BEFORE I removed its reference from the Resources -> Installed Libraries of the calling script.

I created a new ScriptDb with the same name as the old ScriptDb.

When I run the calling script, I get the following message: Library with identifier libraryDb is missing (perhaps it was deleted?)

When I open Resources -> Installed Libraries in the calling script, I get the following message: We're sorry, a server error occurred. Please wait a bit and try again.

And when I click on the Included Libraries -> Title's link: libraryDb in the calling script, I get the following message: Library with identifier MJYZ65NimkGffbICkW9uVWAfx44b5R80M is missing (perhaps it was deleted?)


Steps to reproduce the problem.

  1. Create and Publish the following ScriptDB named libraryDb:

    function getDb() { return ScriptDb.getMyDb(); }

  2. Create and Publish the following calling script named callingScript:

    function callingScript() { var retLibDb = libraryDb.getDb();
    var dbRecord = { name: 'myName' }; retLibDb.save( dbRecord); }

  3. Include the LibraryDb in the calling script (Resources -> Installed Libraries) using the libraryDb project key.

  4. Run the callingScript to authorize and use the libraryDb.

  5. Delete the libraryDb (Code.gs -> File -> Delete).

  6. Create and Publish the following new ScriptDB named libraryDb (same name as first):

    function getDb() { return ScriptDb.getMyDb(); }

  7. In the calling script's Installed Libraries (Resources -> Installed Libraries) remove the old libraryDb reference.

  8. In the calling script's Installed Libraries (Resources -> Installed Libraries) add the new libraryDb reference.

  9. Run the callingScript.


I expect an authorization dialog to appear and let me authorize and run the callingScript.

I get the following messages: Library with identifier libraryDb is missing (perhaps it was deleted?)

Open the calling script's Resources -> Libraries… get the following message: We're sorry, a server error occurred. Please wait a bit and try again.

Click on: Included Libraries -> Title's link: libraryDb, get the following message: Library with identifier MJYZ65NimkGffbICkW9uVWAfx44b5R80M is missing (perhaps it was deleted?)


I'm running: Machine: MacBook Pro OS: OS X 10.7.5 Browser: Safari V 6.0.4 (7536.29.13)

来源:https://stackoverflow.com/questions/23070086/can-not-authorize-calling-script-for-new-scriptdb-when-included-library-remains

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!