jenkins pipeline UI

Post Reply
fajar_muslim
Posts: 1
Joined: Wed Jan 29, 2020 2:48 pm

jenkins pipeline UI

Post by fajar_muslim »

run jenkins pipeline UI, the browser cannot be instantiate. i use ubuntu 18.04

do you ever get same issue below? please tell me how to solve this


error at chrome : NFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
[main] INFO net.serenitybdd.core.webdriver.driverproviders.ProvideNewDriver - Instantiating driver
[main] INFO net.serenitybdd.core.webdriver.driverproviders.ProvideNewDriver - Driver capabilities: Capabilities {acceptInsecureCerts: false, browserName: chrome, goog:chromeOptions: {args: [], extensions: []}, loggingPrefs: org.openqa.selenium.logging..., platform: ANY, version: }
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 27976
Only local connections are allowed.
[31mGiven [0m[31m[ui] the user on pokemon db page[0m [90m# PokemonSteps.uiTheUserOnPokemonDbPage()[0m
[31mnet.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver

error at mozilla : Jan 29, 2020 12:44:05 AM org.openqa.selenium.remote.DesiredCapabilities firefox
INFO: Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
Jan 29, 2020 12:44:05 AM org.openqa.selenium.remote.DesiredCapabilities firefox
INFO: Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
[main] INFO net.serenitybdd.core.webdriver.driverproviders.ProvideNewDriver - Instantiating driver
[main] INFO net.serenitybdd.core.webdriver.driverproviders.ProvideNewDriver - Driver capabilities: Capabilities {acceptInsecureCerts: true, browserName: firefox, firefox_profile: org.openqa.selenium.firefox..., headless: false, loggingPrefs: org.openqa.selenium.logging..., marionette: true, moz:firefoxOptions: {}, platform: ANY, version: }
1580233447264 mozrunner::runner INFO Running command: "/usr/lib/firefox/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.9fKgwjNNBuFE"
Unable to init server: Broadway display type not supported: 0
Error: cannot open display: 0

oktaliem
Posts: 19
Joined: Thu Jan 23, 2020 12:23 pm

Re: jenkins pipeline UI

Post by oktaliem »

Halo mas Fajar,

Menyimpulkan dari error yang dihasilkan oleh Chrome driver "Only local connections are allowed" & "Could not instantiate class org.openqa.selenium.chrome.ChromeDriver" tetapi bisa jalan test automasinya tanpa jenkins, Ubuntu 18.04 dengan Jenkins job nya adalah pipeline.
Pernah mengalami hal serupa, cara saya menyelesaikannya adalah :
1. Membuat jenkins agent/slave
2. Lakukan koneksi agent-nya melalui JNPL (Java Web Start Agent)

Jadi seolah2 dengan koneksi tersebut, maka chrome akan mengenali koneksi jenkins sebagai koneksi lokal.
https://www.quora.com/In-selenium-web-d ... this-error
https://stackoverflow.com/questions/250 ... al-connect

Most driver implementations (the Chrome driver and the IE driver for sure) create a HTTP server. The language bindings (Java, Python, Ruby, .NET, etc.) all use a JSON-over-HTTP protocol to communicate with the driver and automate the browser. Since the HTTP server is simply listening on an open port for HTTP requests generated by the language bindings, connections to the HTTP server started by the language bindings are only allowed to come from other processes on the same host. Note carefully that this limitation does not apply to connections the browser can make to outside websites; rather it simply prevents incoming connections from other websites

Di bawa ini bisa jadi referensi gmana cara set up node/agent/slave si jenkins :
https://support.cloudbees.com/hc/en-us/ ... om-console

Semoga solusi ini membantu, jika tidak mungkin permasalahan yang dihadapi belum sesuai akar masalahnya.

Post Reply