LoginSignup
5

More than 5 years have passed since last update.

posted at

updated at

node v0.10.34 で CERT_UNTRUSTED のエラーが発生する

Heroku で Hubot を動かしている方とかで、今日(2014/12/18)急に bot が動かなくなった方は、エラーログの中に下記のエラーが出力されているかもしれません。

CERT_UNTRUSTED

どうやら 2014/12/17 頃から node v0.10.34 で問題が発生しているようで、下記の Github Issues に既に報告されていました。ルート証明書を更新したことによる不具合のようです。

node v0.10.34 causes untrusted cert errors

下記のコマンドで、 Heroku にログインして node の version を確認してみましょう。

// Heroku ログイン
$ heroku run bash

// node バージョン確認
$ node -v
=> 0.10.34

上記のように、0.10.34 に上がってしまっている場合、バージョンを前の状態に戻したいと思うかもしれません。その時は、heroku 用のリポジトリ直下に配置している package.json の node の値を 0.10.x から 0.10.33(戻したいバージョン) に修正しましょう。

{
  "name": "TechTaro",
  "version": "0.0.0",
  "private": true,
  "author": "ken880guchi <>",
  "description": "A simple helpful robot for your Company",
  "dependencies": {
    "hubot": "^2.9.0",
    "hubot-diagnostics": "0.0.1",
    "hubot-google-images": "^0.1.0",
    "hubot-google-translate": "^0.1.0",
    "hubot-help": "^0.1.1",
    "hubot-heroku-keepalive": "0.0.4",
    "hubot-maps": "0.0.0",
    "hubot-pugme": "^0.1.0",
    "hubot-redis-brain": "0.0.2",
    "hubot-rules": "^0.1.0",
    "hubot-scripts": "^2.5.16",
    "hubot-shipit": "^0.1.1",
    "hubot-slack": "^2.2.0",
    "hubot-youtube": "^0.1.2"
  },
  "engines": {
    "node": "0.10.33"
  }
}

続けて下記のコマンドを実行すれば、node の version を過去の状態へ戻すことが出来ます。

// 編集した package.json を commit
$ git add package.json
$ git ci -m '[Fix] temporarily fix version to 0.10.33'

// 変更内容を heroku へ push
$ git push heroku master
=> Fetching repository, done.

Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 286 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)

-> Node.js app detected
-> Resetting git environment
-> Requested node range:  0.10.33
-> Resolved node version: 0.10.33
-> Downloading and installing node

...(省略)

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
5