We're sorry, a server error occurred while reading from storage. Error code NOT_FOUND

Viewed 3732

I'm facing this issue while I'm running the script. one day before if was working fine for me. I did clear all the cache of chrome browser and I tried another laptop also but the issue is as it is. please help me to resolve the issue.

The code I'm running is:

function onOpen(e) {
  var menu = SpreadsheetApp.getUi().createMenu('Reporting Tools');
  menu.addItem('Create Unit Scorecards', 'HSIPScorecard2021CountryScripts.createInputSheets');
  menu.addItem('Notify Unit H&S Heads', 'HSIPScorecard2021CountryScripts.sendNotifications');
  menu.addItem('Consolidate Unit Data', 'HSIPScorecard2021CountryScripts.Consolidate');
  menu.addToUi();
}
3 Answers

I just ran into the same problem last week. After wasting a few day's time, I found it was caused by a reference to a library using development mode. Change it to a deployment version solved that.

Assuming that the name of the library is correct you can write that like this:

function onOpen(e) {
      SpreadsheetApp.getUi().createMenu('Reporting Tools')
      .addItem('Create Unit Scorecards', 'HSIPScorecard2021CountryScripts.createInputSheets');
      .addItem('Notify Unit H&S Heads', 'HSIPScorecard2021CountryScripts.sendNotifications');
      .addItem('Consolidate Unit Data', 'HSIPScorecard2021CountryScripts.Consolidate');
      .addToUi();
    }

There are two things that need to be checked in order to fix this issue.

  1. The Library reference should link to the Deployment Version and not to the Development Mode.
  2. The Library file should not be restricted in case you are sharing the copy of the original file with somebody else.
Related