Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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();
}
like image 918
Dheeraj Parikh Avatar asked Nov 22 '25 07:11

Dheeraj Parikh


2 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.

like image 99
rugbbyli Avatar answered Nov 23 '25 21:11

rugbbyli


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();
    }
like image 38
Cooper Avatar answered Nov 23 '25 20:11

Cooper



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!