V8, multiple accounts, ScriptError: We're sorry, a server error occurred while reading from storage. Error code PERMISSION_DENIED.

41 views
Skip to first unread message

MEP 2

unread,
Jul 23, 2025, 11:19:15 AM7/23/25
to Google Apps Script Community
Hello good people :)

As we AppsScript add-on devs know, Apps Scripts which are using the Rhino engine have to be migrated to the new V8 engine until January 31, 2026. We tried this migration few years ago, but we were forced to stick with the Rhino engine due to an ongoing issue with multiple accounts.

How are we supposed to migrate to V8 if the issue prevails for several years? We cannot ask our customers (from official docs) "Open incognito mode" or "Logout from all your Google accounts". Any advice would help!

Thanks.

appsscript.json
    {
      "timeZone": "Europe/Prague",
      "dependencies": {
      },
      "exceptionLogging": "STACKDRIVER",
      "runtimeVersion": "V8"
    }

Code.gs
    function onOpen() {
      var ui = SlidesApp.getUi();
      ui.createMenu('Custom Menu')
        .addItem('Open Sidebar', 'showSidebar')
        .addToUi();
    }
   
    function showSidebar() {
      var html = HtmlService.createHtmlOutputFromFile('index')
        .setTitle('My Sidebar')
        .setWidth(300); // Adjust width as needed
   
      SlidesApp.getUi().showSidebar(html);
    }
   
    function getHelloMessage() {
      return "Hello, World from Apps Script!";
    }

index.html
  <!DOCTYPE html>
    <html>
      <head>
        <base target="_top">
      </head>
      <body>
        <h1>Hello Apps Script!</h1>
        <button onclick="sayHello()">Click Me</button>
        <p id="output"></p>
   
        <script>
      function sayHello() {
        google.script.run
          .withSuccessHandler(function(message) {
            document.getElementById('output').innerText = message;
          })
          .withFailureHandler(function(error) {
            document.getElementById('output').innerText = 'Error: ' + error.message;
            document.getElementById('output').style.color = 'red';
          })
          .getHelloMessage();
      }
    </script>
      </body>
    </html>
Reply all
Reply to author
Forward
0 new messages