Help us understand the problem. What is going on with this article?

GASのV8ではFusionTablesの依存設定消しとこう

何が起きたか

意気揚々とGASのエンジンを意気揚々とRhinoからV8に変えてみたところ、トリガー設定してる定期ロジックが軒並みコケてやんの!

エラー内容

「サービス(fusiontables v2)が見つかりません」

該当ロジックはスプレッドシートとかGoogleカレンダーから情報引いてくるだけなので、FusionTablesなんて使ってないハズなんだが・・・?
とか思ってると、過去にFusionTablesを導入してたプロジェクトであることを思い出す。

FusionTables自体はとうの昔に廃止されてたけど、コードはそのまま残ってた。

対処

appsscript.jsonにFusionTablesの依存設定(dependencies)が入ってるのでそれを消す。

これを
{
  "timeZone": "Asia/Tokyo",
  "dependencies": {
    "enabledAdvancedServices": [{
      "userSymbol": "Gmail",
      "serviceId": "gmail",
      "version": "v1"
    }, {
      "userSymbol": "FusionTables",
      "serviceId": "fusiontables",
      "version": "v2"
    }],
    "libraries": [{
      "userSymbol": "createHTMLDraftInGmail",
      "libraryId": "1Q2wtH6ZHe-1RSMyExp9zKdzFrwPNPxyXIKMwsfFFZqMdkc0uUNTIvbRv",
      "version": "1"
    }]
  },
  "webapp": {
    "access": "ANYONE_ANONYMOUS",
    "executeAs": "USER_DEPLOYING"
  },
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8"
}
こうじゃ
{
  "timeZone": "Asia/Tokyo",
  "dependencies": {
    "enabledAdvancedServices": [{
      "userSymbol": "Gmail",
      "serviceId": "gmail",
      "version": "v1"
    }],
    "libraries": [{
      "userSymbol": "createHTMLDraftInGmail",
      "libraryId": "1Q2wtH6ZHe-1RSMyExp9zKdzFrwPNPxyXIKMwsfFFZqMdkc0uUNTIvbRv",
      "version": "1"
    }]
  },
  "webapp": {
    "access": "ANYONE_ANONYMOUS",
    "executeAs": "USER_DEPLOYING"
  },
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8"
}

なお、Rhinoのままだと定義が残ってても大丈夫な模様。

もしかしたら他にもいらん定義残ってるかもナァ

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした