Ways to speed up add on review?

30 views
Skip to first unread message

james cui

unread,
Dec 13, 2020, 2:21:44 PM12/13/20
to google-apps-sc...@googlegroups.com
Hey app script experts,

    I am a new developer in google app script. When I submit my first add on for google to review, it reports that the app script has a problem. The reviewer only shows a screenshot saying "script XXX experienced an error", but I cannot reproduce from my side using different versions and different inputs. Since I do not have any detailed error message and I cannot reproduce the problem, I have to ask the reviewer to check different options to isolate the problem for me. 
However, they never replied to me. May I ask how you guys solve this problem? Could you please share the ways of speeding up the review? I am really frustrated about the review progress.  How long does that take your addon for passing the review?



Thanks a lot!

Alan Wells

unread,
Dec 13, 2020, 2:47:32 PM12/13/20
to Google Apps Script Community
There is no standard amount of time for passing the review.
You need to set up error handling in your code, so that your code tells you what the problem is and where the error came from.
You can't rely on users telling you what the problem is.
I would never ask the reviewer to help me debug my code.
Create a different Google account if you don't have another Google account, and test your add-on from the different account.
But even if you can reproduce the problem, you still might not have any good clues unless your code catches the error and logs it somewhere.
Are you using try/catch to catch errors?
Are you logging errors to stackdriver?

james.c...@gmail.com

unread,
Dec 13, 2020, 3:21:21 PM12/13/20
to Google Apps Script Community
Thanks AJ for your answers, 
for waiting for the results, is the google doc the only channel that I can ping the reviewer?
Other than that do you have emails to do that? 

For error handling, 
I actually did a similar way of try catch by using the following pattern
google.script.run
     .withSuccessHandler(onSuccess)
     .withFailureHandler(onError)
     .functionToRun(param1, param2, ....)
That should be the same with try catch, right? (I actually added a throw in the function, and I can catch the error on UI). 

   

Alan Wells

unread,
Dec 13, 2020, 3:35:56 PM12/13/20
to Google Apps Script Community
The withSuccessHandler handles the server error on the client side (in your browser) which won't get the error back to you.
Unless you call the server again from the client side and log an error.
You need something to get an error logged to some place that you have access to, not just that the user sees in the browser.
Most users won't tell you that there is a problem.
You want to know if there is a problem before someone reports it.
If you wait until someone reports an error, then it's too late.
By then people will have already given you a bad rating.
And they'll find a way to give you bad rating, but most people won't make the effort to contact you.
console.log()
on the server side will either log the error to stackdriver or your executions.
Depending upon how you have things set up.

james.c...@gmail.com

unread,
Dec 13, 2020, 3:50:13 PM12/13/20
to Google Apps Script Community

I see, thanks AJ for your suggestions! These are really valuable! 
I do see adding try catch in server side makes sense, but I do not know how to achieve that,
if using GAS Logger, and if other person open the script and had an error, 
can I see that? (I do know if I run the script myself and logging something, I can see that, 
but not sure whether that's true when another person has an error).  

Alan Wells

unread,
Dec 13, 2020, 4:06:27 PM12/13/20
to Google Apps Script Community
Even though the add-on is running under the authority of the user,
any error that the user has will be logged to your account.
At the least, have a try/catch in your first function.

function nameOfMyFnc_() {
try{


}catch(e){
  console.log(e);
}
}

Errors in functions that are called from your first function will also get caught, BUT
I'd add a try/catch to all your functions.

By default the appsscript.json manifest file enables stackdriver.
"exceptionLogging": "STACKDRIVER",

Your Cloud Project should have the stackdriver API enabled.
That's in the same place where you enabled the Marketplace API.

james cui

unread,
Dec 13, 2020, 5:12:39 PM12/13/20
to google-apps-sc...@googlegroups.com
got it, this is awesome, and thanks AJ!
Regarding your suggestion to use a new account to reproduce the problem, 
I am wondering if it is possible to install the addon from another account without 
copying over the app script project and building addon again? 
(but just similar to the how reviewers install that although I do not know how they do that)

--
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/b6dd353f-7a65-4cb9-b760-2f18d022ab4dn%40googlegroups.com.

Alan Wells

unread,
Dec 13, 2020, 6:30:10 PM12/13/20
to Google Apps Script Community
If your add-on was already published, then obviously you could install it from another account.
But the problem is, it needs to be approved, so you're caught in a difficult situation.
What I do is share the Apps Script file with the other account,
then make a copy of the shared file in the other account.
Then unshare the Apps Script file.  I just do that so that I don't end up with lots of shared files that I have forgotten about.
What type of add-on is it?

james cui

unread,
Dec 13, 2020, 7:18:34 PM12/13/20
to google-apps-sc...@googlegroups.com
I see, I actually did exactly that you mentioned, but still cannot reproduce the problem.
That is a sheet addon, it has not been published yet. 

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/pLdH6vEAwRY/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/b6734558-3b9e-4aa7-964f-5e8fdfdc12b0n%40googlegroups.com.

Alan Wells

unread,
Dec 13, 2020, 7:41:45 PM12/13/20
to Google Apps Script Community
Open the Apps Script file that the reviewer used.
Click the View menu, and then Executions.
In your Executions, there is a filter at the top with a tag that states "Ran As: Me"
Click the X to remove that tag.
Look for an execution that would have happened on the date and time that the reviewer ran the code.
I don't know if that will show you anything, but it's worth trying.
Reply all
Reply to author
Forward
0 new messages