Specified object must be part of the sheet. at onOpen in a Sheets add-on?

94 views
Skip to first unread message

Faustino Rodriguez

unread,
Feb 19, 2020, 11:14:07 AM2/19/20
to Google Apps Script Community
Any idea on what is this error?

"Specified object must be part of the sheet."

at onOpen() function in a Google Sheets add-on 

I got 4 instances of that error today from different users, reported at StackDriver

The onOpen function only has one line of code

SpreadsheetApp.getUi().createAddonMenu()
   
.addItem("text", 'function')
   
.addToUi();


Martin Molloy

unread,
Feb 19, 2020, 12:01:58 PM2/19/20
to google-apps-sc...@googlegroups.com
I've just seen that too. Mine is also just adding the add-on menu

Its listed twice in Stackdriver logs
 
Martin Molloy
MTMOMK Limited
Add-ons: 
Form Maker; Create forms quickly and easily using a spreadsheet interface.
SheetsIE; Automate the movement of data between files of different types.
Accounts Manager; Manage User Accounts for your domain from a spreadsheet.
Classroom Manager; Mange Google Classroom classes and class lists for one teacher or the whole domain
Password Manager; Delegate management of user password resets to trusted users.
Drive Files Metadata; use a spreadsheet to view and mange metadata about your Google Drive files.
Sheets Pages Manager; Manage the pages in your Google Sheets files.


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/00115e00-ce74-4fea-b515-64dc06f344fe%40googlegroups.com.

Faustino Rodriguez

unread,
Feb 26, 2020, 5:42:23 PM2/26/20
to Google Apps Script Community
I have got 35 instances/users affected by this weird error since Feb.18
- As far as I can tell, it happens on the very first onOpen after the user installed the add-on

Any Googler around to help on this?

By the way, it is unrelated with the new V8

Alex

unread,
Feb 27, 2020, 12:07:32 AM2/27/20
to Google Apps Script Community
And there https://stackoverflow.com/questions/60425430/ too

Is any topic on Issues Tracker?

Sergey Bekharsky

unread,
Feb 27, 2020, 6:47:56 AM2/27/20
to google-apps-sc...@googlegroups.com
We're having hundreds of this errors while just trying to get active document. I. e. on calling SpreadsheetApp.getActiveSpreadsheet() we get this:
Specified object must be part of the sheet


And it's also started at February, 18. And we even have "runtimeVersion": "DEPRECATED_ES5" in our manifest file, so it's unrelated to V8 engine but can be related to whole infrastructure changing since Google start automatically switch GAS users to V8. 

Alex

unread,
Feb 27, 2020, 11:30:32 PM2/27/20
to google-apps-sc...@googlegroups.com
Is this all the code?

Can we look for the problem in coding patterns or scopes?


On Wednesday, February 19, 2020 at 7:14:07 PM UTC+3, Faustino Rodriguez wrote:

Sergey Bekharsky

unread,
Feb 28, 2020, 5:23:15 AM2/28/20
to Google Apps Script Community
We created an issue about that: https://issuetracker.google.com/issues/150397971

Please, feel free to post your refinements there also.


On Wednesday, February 19, 2020 at 6:14:07 PM UTC+2, Faustino Rodriguez wrote:
Reply all
Reply to author
Forward
0 new messages