问题
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.
Create and Publish the following ScriptDB named libraryDb:
function getDb() { return ScriptDb.getMyDb(); }
Create and Publish the following calling script named callingScript:
function callingScript() { var retLibDb = libraryDb.getDb();
var dbRecord = { name: 'myName' }; retLibDb.save( dbRecord); }Include the LibraryDb in the calling script (Resources -> Installed Libraries) using the libraryDb project key.
Run the callingScript to authorize and use the libraryDb.
Delete the libraryDb (Code.gs -> File -> Delete).
Create and Publish the following new ScriptDB named libraryDb (same name as first):
function getDb() { return ScriptDb.getMyDb(); }
In the calling script's Installed Libraries (Resources -> Installed Libraries) remove the old libraryDb reference.
In the calling script's Installed Libraries (Resources -> Installed Libraries) add the new libraryDb reference.
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