Minimal reproduction of GAS V8 bug
- Deploy this to an Apps Script project that is published in the Marketplace as a Sheets Add-On
- Bump the deployed script version number
- Install the Add-On in a template sheet
- Open the template sheet using this URL structure:
<sheet_url>/template/preview
- Remove
/edit
from the sheet URL, if present
- Remove
- Click the blue 'Use Template' button in the top right corner of the page
- Wait for the template to be copied and the "Document add-ons" sidebar to open
- Click the 'Use' button, see console errors reported:
We're sorry, a server error occurred while reading from storage. Error code PERMISSION_DENIED.
For contrast, try using the Add-On through the menu bar, and it works as expected. Only the 'Use' button is broken (and only when using the V8 runtime)