さわらブログ

さわら(@xhiroga)の技術ブログ

Google Apps Script GitHub アシスタント で Error [github assistant] undefined と表示される → Google Apps Script API をオンにしよう

TL;DR

Google Apps Script GitHub アシスタント で Pull に失敗し、かつ Error [github assistant] undefined を表示されている場合、Google Apps Script API がオンになっていない可能性があります。

chrome.google.com

設定からオンにしましょう。

詳細

以下の通り、エラーが表示されることがあります。

f:id:hiroga_cc:20210130174536p:plain
Error [github assistant] undefined

Developer Consoleでログを見てみると...

{
  "error": {
    "code": 403,
    "message": "User has not enabled the Apps Script API. Enable it by visiting https://script.google.com/home/usersettings then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.LocalizedMessage",
        "locale": "en-US",
        "message": "User has not enabled the Apps Script API. Enable it by visiting https://script.google.com/home/usersettings then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
      }
    ]
  }
}

ユーザーがApps Script APIを有効にしていません。https://script.google.com/home/usersettings にアクセスして有効化し、再試行してください。最近この API を有効にした場合は、アクションが当社のシステムに伝搬するまで数分待ってから再試行してください。

ということで、APIをオンにしたら無事動きました。