I recently asked this question on stack Google App Scripts - Function calls with google.script.run always failing
I was having trouble getting a button in the sidebar to launch a script in my code.gs. Turns out if I had the user that has permissions for that sheet set as default user in google everything worked perfect. But if I had my personal account set as default the function would fail.
Anyone know of a fix for this?