内部で Webdriver.io / Selenium を使用する Chimp を使用して、Fargate でテスト ケースを実行しようとしています。EC2 インスタンスで実行している場合、Docker コンテナで問題なく動作しますが、コンテナを ECS にアップロードし、Fargate を使用して同じテストを実行しようとするとすぐに、次のエラーが発生します。
Chimp version: 0.50.2
ChromeDriver version: ChromeDriver 2.34.522913 (36222509aa6e819815938cbf2709b4849735537c)
Java version: openjdk version "1.8.0_151", OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-1~deb9u1-b12), OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
Selenium version: 3.8.1
Selenium drivers version: chrome: 2.34, ie: 2.50.0, firefox: 0.19.1
OS version: Linux 4.9.62-21.56.amzn1.x86_64
Node version: v6.11.5
Browser version: chrome undefined
[33m
[chimp] Running...[39m
[chimp][helper] setupBrowserAndDDP had error
{ Error: unknown error: Chrome failed to start: exited abnormally
at initBrowser (node_modules/chimp/dist/lib/chimp-helper.js:189:43)
at Object.setupBrowserAndDDP (node_modules/chimp/dist/lib/chimp-helper.js:264:7)
at node_modules/chimp/dist/lib/cucumberjs/hooks.js:22:24
at node_modules/meteor-promise/fiber_pool.js:43:40
(Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.9.62-21.56.amzn1.x86_64 x86_64)
at new RuntimeError (node_modules/webdriverio/build/lib/utils/ErrorHandler.js:144:12)
at Request._callback (node_modules/webdriverio/build/lib/utils/RequestHandler.js:313:39)
at Request.self.callback (node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback [as _tickCallback] (internal/process/next_tick.js:128:9)
details: undefined,
message: 'unknown error: Chrome failed to start: exited abnormally\n (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.9.62-21.56.amzn1.x86_64 x86_64)',
type: 'RuntimeError',
seleniumStack:
{ type: 'UnknownError',
message: 'An unknown server-side error occurred while processing the command.',
orgStatusMessage: 'unknown error: Chrome failed to start: exited abnormally\n (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.9.62-21.56.amzn1.x86_64 x86_64)' } }
Error: unknown error: Chrome failed to start: exited abnormally
at initBrowser (node_modules/chimp/dist/lib/chimp-helper.js:189:43)
at Object.setupBrowserAndDDP (node_modules/chimp/dist/lib/chimp-helper.js:264:7)
at node_modules/chimp/dist/lib/cucumberjs/hooks.js:22:24
at node_modules/meteor-promise/fiber_pool.js:43:40
(Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.9.62-21.56.amzn1.x86_64 x86_64)
at new RuntimeError (node_modules/webdriverio/build/lib/utils/ErrorHandler.js:144:12)
at Request._callback (node_modules/webdriverio/build/lib/utils/RequestHandler.js:313:39)
at Request.self.callback (node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback [as _tickCallback] (internal/process/next_tick.js:128:9)
Cucumber steps failed
テスト スクリプトの先頭に次の行を追加して、Chrome が存在し、応答していることを確認しました。
echo Running chrome version:
google-chrome --version
結果は次のとおりです。
Running chrome version:
Google Chrome 62.0.3202.75
そのため、Chrome はそこにあり、応答しています。Fargate で機能しないのはなぜですか?
最初の Chimp デバッグ情報からの次のデバッグ行が最大の原因のようです。
Browser version: chrome undefined
見つからない理由がわかりません。ローカルで実行しているときに正しいバージョンが報告されます。