Report: Recent Value of ScriptApp.getService().getUrl() in Google Apps Script

There is a method of ScriptApp.getService().getUrl() for obtaining the Web Apps URL in Google Apps Script.

But, in the current stage, when I access this endpoint, the message of Sorry, unable to open the file at this time. Please check the address and try again. is returned. So, I tried to search the deployment ID of ### from https://script.google.com/macros/s/###/exec returned with current ScriptApp.getService().getUrl(). But, unfortunately, I cannot find the deployment ID. I’m worried that this might be related to the error.

In order to test this situation, I used the following sample script to the standalone script.

function doGet() {
  return HtmlService.createHtmlOutput("Done.");
}

function getUrl() {
  console.log(ScriptApp.getService().getUrl());
}

Can you replicate it? If my test was not correct, if you tell me it, I’m glad.

Added

I have reported this to Google issue tracker as a bug. https://issuetracker.google.com/issues/235862472

 Share!