[Help] onEdit installable trigger is not firing when editing the spreadsheet

369 views
Skip to first unread message

Leandro Zubrezki

unread,
Jun 25, 2021, 1:54:12 PM6/25/21
to Google Apps Script Community
I have a Google Workspace Add on already in the marketplace. I am developing a feature that allows user to make change to a sheet and send those changes automatically to a third party service.

It works correctly for me, I have even created a new Google account in incognito mode, installed the add on and tested the feature from the deployed version and it is also working. But for the rest of the users I have talked with the trigger is not firing.

Do you have any ideas?

startEditMode.png
handler.png

I have also defined a global function onEdit but that one is also not firing:

function onEdit(e: GoogleAppsScript.Events.SheetsOnEdit) {
  console.log('onEdit');
  console.log(e);
}

The add on has all the required scopes:

And as I mentioned, I created a new Google account, installed the add on and it worked for that one so I don't really know what to try next.

Alan Wells

unread,
Jun 25, 2021, 3:09:51 PM6/25/21
to Google Apps Script Community
There was a bug for something similar, but I don't know if it's related to your issue.

But other than that, I have no ideas.

Leandro Zubrezki

unread,
Jun 25, 2021, 3:42:34 PM6/25/21
to Google Apps Script Community
Thanks for the reply, in my case that is not the problem because it returns the spreadsheet correctly and the trigger gets created correctly, but just doesn't get executed.

I will try replacing .getActive for getActiveSpreadsheet, there is no difference in the documentation but I have seen some comments that say they don't have the same methods.

Alan Wells

unread,
Jun 25, 2021, 4:54:46 PM6/25/21
to Google Apps Script Community
I've never seen the:
e : GoogleAppsScript.Events.SheetsOnEdit
as a parameter before.
Are you sure that's working?

Leandro Zubrezki

unread,
Jun 25, 2021, 4:56:02 PM6/25/21
to google-apps-sc...@googlegroups.com
Oh yes that it is on Visual Studio Code, I am using typescript to develop the add on, that gets then transpiled to js.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/qxcnvxJ8wKs/unsubscribe.
To unsubscribe from this group and all its topics, 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/1a9a1376-8363-4ef4-b5a9-b653357caee9n%40googlegroups.com.


--
     Leandro Zubrezki

Reply all
Reply to author
Forward
0 new messages