node-huxley无法启动弹性竹w / ubuntu

时间:2014-11-21 23:53:17

标签: administration bamboo selenium-chromedriver huxley

在OSX上,使用chromedriver的node-huxley工作正常。为了使用huxley设置CI,我在运行ubuntu的弹性竹实例上安装了chrome和chromedriver。我在chromedriver日志中反复得到DevTools request failed(在下面的完整输出中删节)。我如何通过此错误?

chromedriver log:

$ cat /tmp/chrome.log
[15.188][INFO]: COMMAND InitSession {
   "desiredCapabilities": {
      "browserName": "chrome",
      "chromeOptions": {
         "args": [ "--test-type" ]
      }
   }
}
[15.188][INFO]: Populating Preferences file: {
   "alternate_error_pages": {
      "enabled": false
   },
   "autofill": {
      "enabled": false
   },
   "browser": {
      "check_default_browser": false
   },
   "distribution": {
      "import_bookmarks": false,
      "import_history": false,
      "import_search_engine": false,
      "make_chrome_default_for_user": false,
      "show_welcome_page": false,
      "skip_first_run_ui": true
   },
   "dns_prefetching": {
      "enabled": false
   },
   "profile": {
      "content_settings": {
         "pattern_pairs": {
            "https://*,*": {
               "media-stream": {
                  "audio": "Default",
                  "video": "Default"
               }
            }
         }
      },
      "default_content_settings": {
         "geolocation": 1,
         "mouselock": 1,
         "notifications": 1,
         "popups": 1,
         "ppapi-broker": 1
      },
      "password_manager_enabled": false
   },
   "safebrowsing": {
      "enabled": false
   },
   "search": {
      "suggest_enabled": false
   },
   "translate": {
      "enabled": false
   }
}
[15.188][INFO]: Populating Local State file: {
   "background_mode": {
      "enabled": false
   },
   "ssl": {
      "rev_checking": {
         "enabled": false
      }
   }
}
[15.189][INFO]: Launching chrome: /opt/google/chrome/google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-hang-monitor --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-logging --ignore-certificate-errors --load-extension=/tmp/.com.google.Chrome.EUout2/internal --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12583 --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --test-type --use-mock-keychain --user-data-dir=/tmp/.com.google.Chrome.d9rGhd data:,
[15.190][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[15.193][WARNING]: PAC support disabled because there is no system implementation
[15.323][DEBUG]: DevTools request failed
[15.380][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[15.380][DEBUG]: DevTools request failed
[15.430][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[15.431][DEBUG]: DevTools request failed
[15.481][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[15.482][DEBUG]: DevTools request failed
[3039:3039:1121/232539:ERROR:browser_main_loop.cc(209)] Gtk: cannot open display:
[15.532][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[15.533][DEBUG]: DevTools request failed
[15.583][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[15.583][DEBUG]: DevTools request failed
[15.634][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[15.634][DEBUG]: DevTools request failed

……

[75.099][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[75.099][DEBUG]: DevTools request failed
[75.149][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[75.149][DEBUG]: DevTools request failed
[75.200][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version
[75.200][DEBUG]: DevTools request failed
[75.201][INFO]: RESPONSE InitSession unknown error: Chrome failed to start: exited abnormally
[75.201][DEBUG]: Log type 'driver' lost 0 entries on destruction
[75.201][DEBUG]: Log type 'browser' lost 0 entries on destruction

1 个答案:

答案 0 :(得分:0)

我在Atalassian Answers上发布了这个问题,并从Atlassian开发者处获得了 this response

  

看起来这个工具需要实际的X Server显示。为了要做   它适用于无头Ubuntu你需要安装xvfb并使用   xvfb-run命令用虚拟显示器运行工具。