If you read the documentation about permissions and simple triggers, you will learn that simple triggers can't do anything that requires authorization because they run under the authority of the "user at the keyboard" and do it silently.
Change the function name and create an installable onOpen trigger that will be executed as yourself.