How to Solve “The document is inaccessible. Please try again later.” Error

By | April 27, 2021


I will share the solution when I encounter the following error when running GAS(GoogleAppsScript).

Exception: The document is inaccessible. Please try again later.
methodName1 @
methodName2 @


I was trying to create a copy of a google document with the following code.

The problem was that the google document I was trying to load was actually “Word format” not “Google Document format”.

var documentId = "enter your google document file name"  
var file = DriveApp.getFileById(documentId).makeCopy('NDA_' + lastname);
var nda = DocumentApp.openById(file.getId());

Other solution?

In the StackOverflow below, the solution of changing the default account of the Chrome browser was answered, but it was not effective in my case.

Author: Regardie

Salesforce & AWS Enthusiast.