Unclear how to address SES initialization errors in Google Apps Script

202 Views Asked by At

I have a script that I want to run as a dialog in a Google text document. When I replace the URL in the call to HtmlService.createHtmlOutputFromFile with a simple script it works fine. For my script it seems that it was rejected by SES initialization. I see in the console:

SES initialization
...
ses-single-frame.opt.js?debug=1:43  Max Severity: Safe spec violation(1).
ses-single-frame.opt.js?debug=1:43  440 Apparently fine
ses-single-frame.opt.js?debug=1:43  43 Deleted
ses-single-frame.opt.js?debug=1:43  3 Frozen harmless
ses-single-frame.opt.js?debug=1:43  1 Skipped
ses-single-frame.opt.js?debug=1:43  Max Severity: Safe spec violation(1).
ses-single-frame.opt.js?debug=1:43  initSES succeeded.

I assume that somewhere I'm violating the GAS security restrictions but I don't know how to find out where. Is there a way to find out where in my code there is a "Safe spec violation"?

1

There are 1 best solutions below

0
Kevin Reid On

Don't worry.

SES initialization occurs long before any code you write is loaded; the log you are looking at refers to errors in the browser's implementation of JavaScript and web APIs.

The one reason that you might care about what's in this log is if SES failed to successfully patch a bug that affected your code — however, the result would be no worse than running the same code in the same browser outside of the Caja environment, and the bugs SES concerns itself with are generally corner cases that typical JavaScript code will never get near (unless it uses Object.freeze).