We're randomly getting this error for some of our users. We're trying to access form by using this function
const form = FormApp.getActiveForm();
Here is the image of cloud error
Not able to understand where the issue is. Any help is appriciated
We're randomly getting this error for some of our users. We're trying to access form by using this function
const form = FormApp.getActiveForm();
Here is the image of cloud error
Not able to understand where the issue is. Any help is appriciated
I was investigating this issue and I found some information that might help you.
I found this post with 2 valid answers.
The first answer:
The following situation produces the error:
- User A has access to the form and activates the addon / on form submit trigger
- User B has also access to the form
- User A gets removed from the form (IMPORTANT: the trigger does still exist within his/her environment: https://script.google.com/home/triggers)
- User B continues to make surveys, let's say user C submits the form The remaining trigger from User A fires and produces the error
The second answer:
I'm wondering if the error occurs to form collaborators (form editors, not the owner) that have not edited the form.
What about this "workaround"?
On your add-on function that creates the trigger using a try... catch try to get the Document properties. If there is an error, insert a question, then remove it.
Another thing I found here, is that the error might be related to: "The script was failing to run due to insufficient privileges granted to it"
This access is granted through the authorization window of what is in the OAuth scope when setting up the trigger.
- Missing OAuth scopes for the project.
- Third-party apps are created with insufficient permissions granted when setting triggers.
- Error when fired.
Lastly, I found an issue tracker but with the FormApp.openById. If you test all the things above, your users are having issues. I will say to open a new issue tracker here