Azure Pipeline Unit Test execution can't find any audio devices - audio

I am currently using Azure Pipelines to build and run my google unit tests. My Azure Pipeline is setup to utilize a self hosted agent that is running on a VM. MY specific unit test requires an audio output device and when the Pipeline runs my unit test it finds 0 audio devices. If I log into my VM running the agent and run the SAME unit test it finds 3 audio devices. Is there a way to configure the hosted agent or the Pipeline to have an audio device in its devices?
My VM is running Windows 10 with the agent service running on it for the Pipeline builds and execution.
Pipeline log file showing 0 devices
2022-10-12 18:19:49.451 +0000 Info 10672 Audio.cpp:106 PortAudio version: 1246976
2022-10-12 18:19:49.451 +0000 Info 10672 Audio.cpp:107 Version text: PortAudio V19.7.0-devel
2022-10-12 18:19:49.451 +0000 Info 10672 Audio.cpp:108 Number of Devices: 0
2022-10-12 18:19:49.451 +0000 Info 10672 Audio.cpp:110 Pa_GetDefaultOutputDevice is -1
2022-10-12 18:19:49.451 +0000 Info 10672 Audio.cpp:111 Pa_GetDefaultInputDevice is -1
VM log file showing 3 devices
2022-10-12 18:31:02.674 +0000 Info 10584 Audio.cpp:106 PortAudio version: 1246976
2022-10-12 18:31:02.674 +0000 Info 10584 Audio.cpp:107 Version text: PortAudio V19.7.0-devel
2022-10-12 18:31:02.674 +0000 Info 10584 Audio.cpp:108 Number of Devices: 3
2022-10-12 18:31:02.674 +0000 Info 10584 Audio.cpp:110 Pa_GetDefaultOutputDevice is 1
2022-10-12 18:31:02.674 +0000 Info 10584 Audio.cpp:111 Pa_GetDefaultInputDevice is -1

Related

play framework logs are in UTC even system timezone is IST

i set aws system timezone to IST.
$ timedatectl
Local time: Fri 2018-06-15 16:43:20 IST
Universal time: Fri 2018-06-15 11:13:20 UTC
RTC time: Fri 2018-06-15 11:13:20
Time zone: Asia/Kolkata (IST, +0530)
Network time on: yes
NTP synchronized: no
RTC in local TZ: no
but play framework logs are still generating with UTC time zone
2018-06-15 11:22:46,002 [INFO] from application in main - Creating Pool for datasource 'default'
i am using play framework 2.5
and i am running play framework by sudo sbt clean dist
Try passing the timezone to the JVM like so:
sbt -Duser.timezone=Asia/Kolkata
In conf/logback.xml there should be a conversion word %date in an element similar to
<pattern>%date [%level] from %logger in %thread - %message%n%xException</pattern>
Date conversion word has format date{pattern, timezone} and by default:
...in the absence of the timezone parameter, the default timezone of the
host Java platform is used.
Therefore the JVM, and not the OS, has the final word on the timezone.

Jenkins Pipeline launches Protractor Selenium server, then freezes forever

I'm trying to launch Protractor tests in a Jenkins Pipeline job.
I get a success message, but then the job hangs forever.
I'm running the build on an Ubuntu machine.
The build's logs...
[Bac à sable pipeline] Running shell script
+ sudo webdriver-manager update
[17:46:51] I/update - chromedriver: file exists /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.29.zip
[17:46:51] I/update - chromedriver: unzipping chromedriver_2.29.zip
[17:46:52] I/update - chromedriver: setting permissions to 0755 for /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.29
[17:46:52] I/update - chromedriver: chromedriver_2.29 up to date
[17:46:52] I/update - selenium standalone: file exists /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar
[17:46:52] I/update - selenium standalone: selenium-server-standalone-3.4.0.jar up to date
[17:46:53] I/update - geckodriver: file exists /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.16.1.tar.gz
[17:46:53] I/update - geckodriver: unzipping geckodriver-v0.16.1.tar.gz
[17:46:53] I/update - geckodriver: setting permissions to 0755 for /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.16.1
[17:46:53] I/update - geckodriver: geckodriver-v0.16.1 up to date
[Pipeline] sh
[Bac à sable pipeline] Running shell script
+ webdriver-manager start --seleniumPort 4445
[17:46:56] I/start - java -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.29 -Dwebdriver.gecko.driver=/usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.16.1 -jar /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar -port 4445
[17:46:56] I/start - seleniumProcess.pid: 20154
17:46:58.246 INFO - Selenium build info: version: '3.4.0', revision: 'unknown'
17:46:58.247 INFO - Launching a standalone Selenium Server
2017-05-22 17:46:58.383:INFO::main: Logging initialized #1398ms to org.seleniumhq.jetty9.util.log.StdErrLog
17:46:58.669 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
17:46:58.687 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
17:46:58.687 INFO - Driver class not found: com.opera.core.systems.OperaDriver
17:46:58.688 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
17:46:58.688 INFO - Driver class not found: com.opera.core.systems.OperaDriver
17:46:58.691 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
17:46:58.701 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
2017-05-22 17:46:58.964:INFO:osjs.Server:main: jetty-9.4.3.v20170317
2017-05-22 17:46:59.226:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#475530b9{/,null,AVAILABLE}
2017-05-22 17:46:59.353:INFO:osjs.AbstractConnector:main: Started ServerConnector#393c0317{HTTP/1.1,[http/1.1]}{0.0.0.0:4445}
2017-05-22 17:46:59.356:INFO:osjs.Server:main: Started #2371ms
17:46:59.356 INFO - Selenium Server is up and running
EDIT:
Here are the Jenkins logs
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.335 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#22345313
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.336 INFO - Started HttpContext[/wd,/wd]
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.336 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.336 INFO - Started HttpContext[/,/]
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.340 INFO - Started SocketListener on 0.0.0.0:4444
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.344 INFO - Started org.openqa.jetty.jetty.Server#6eb7407d
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.375 INFO - Starting auto registration thread. Will try to register every 5000 ms.
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.376 INFO - Registering the node to the hub: http://mydomain.foobar:9093/grid/register
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.431 INFO - The node is registered to the hub and ready to use
And the Jenkins Selenium Plugin logs:
May 23, 2017 9:10:19 AM org.openqa.grid.internal.Registry add
INFO: Registered a node http://172.17.0.1:4444
May 23, 2017 9:16:01 AM org.openqa.grid.internal.Registry add
INFO: Registered a node http://172.17.0.1:9095
This one, or this one, didn't help. Any ideas?
I managed to run the task without hang using this command:
xvfb-run -a webdriver-manager start --seleniumPort 4445 &
-a makes xvfb run on the first available display, and & makes this task run in the background.

BBB Palette not displayed on Node-Red on Beaglebone Black Wireless

My node-red installation does not display the nodes needed for accessing beaglebone IOs (node-red-node-beaglebone).
In my opinion error is actually caused because node-red-node-beaglebone loads octalbonescript which needs serialport, and something requests serialPort instead of serialport there.
I already tried the preinstalled, stable and lts nodejs version. Additionally npm#2 and npm#3 for installing the nodes. The .node-red folder was also already deleted by me and the node-red-node-beaglebone packaged got installed in the .node-red/node_modules folder started from scrach.
root#beaglebone:/etc# cat debian_version
8.7
root#beaglebone:~# npm -v
2.15.11
root#beaglebone:~# uname -a
Linux beaglebone 4.4.30-ti-r64 #1 SMP Fri Nov 4 21:23:33 UTC 2016 armv7l GNU/Linux
root#beaglebone:~# export AUTO_LOAD_CAPE=0 #optional
root#beaglebone:~# node-red-pi
1487183133432 Board Looking for connected device
15 Feb 19:25:34 - [info]
Welcome to Node-RED
===================
15 Feb 19:25:34 - [info] Node-RED version: v0.16.2
15 Feb 19:25:34 - [info] Node.js version: v6.9.5
15 Feb 19:25:34 - [info] Linux 4.4.30-ti-r64 arm LE
15 Feb 19:25:44 - [info] Loading palette nodes
15 Feb 19:25:57 - [warn] ------------------------------------------------------
15 Feb 19:25:57 - [warn] [bbb] ReferenceError: serialPort is not defined +seems to be the problem
15 Feb 19:25:57 - [warn] ------------------------------------------------------
15 Feb 19:25:57 - [info] Settings file : /root/.node-red/settings.js
15 Feb 19:25:57 - [info] User directory : /root/.node-red
15 Feb 19:25:57 - [info] Flows file : /root/.node-red/flows_beaglebone.json
15 Feb 19:25:57 - [info] Creating new flow file
15 Feb 19:25:57 - [debug] loaded flow revision: 513fd923d68021b8ee98fcb250470340
15 Feb 19:25:57 - [debug] red/runtime/nodes/credentials.load : no user key present
15 Feb 19:25:57 - [debug] red/runtime/nodes/credentials.load : using default key
15 Feb 19:25:57 - [info] Starting flows
15 Feb 19:25:57 - [info] Started flows
15 Feb 19:25:57 - [info] Server now running at http://127.0.0.1:1880/

Unable to connect to artifactory after service restart on CentOS7

I'm a total linux newbie and I'll drop the story here so hopefully someone knows what's going on.
I have a linux box running CentOS and I have artifactory running as a service. After I restarted the server everything started back up but I'm no longer able to connect to artifactory. I checked the artifactory log and everything says it started fine
artifactory.log
2017-02-09 22:15:12,149 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:360) - Artifactory application context is ready.
2017-02-09 22:15:12,152 [art-init] [INFO ] (o.a.w.s.ArtifactoryContextConfigListener:225) -
###########################################################
### Artifactory successfully started (7.122 seconds) ###
###########################################################
Then I checked the tomcat log to make sure that that started fine
catalina.log
INFO: Starting service Catalina
Feb 09, 2017 10:25:42 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.56
Feb 09, 2017 10:25:42 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /opt/jfrog/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml
Feb 09, 2017 10:25:47 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deployment of configuration descriptor /opt/jfrog/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml has finished in 4,865 ms
Feb 09, 2017 10:25:47 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/jfrog/artifactory/tomcat/webapps/ROOT
Feb 09, 2017 10:25:47 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/jfrog/artifactory/tomcat/webapps/ROOT has finished in 246 ms
Feb 09, 2017 10:25:47 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8081"]
Feb 09, 2017 10:25:47 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8019"]
I'm at a point where I'm not even sure what to check. When I try to connect to the page I just get the "The Connection has time out".
If anyone knows anything I can check I'd be extremely grateful.
edit:
Running a netstat -tulnp it shows the ports as open
tcp6 0 0 127.0.0.1:8015 :::* LISTEN 3538/java
tcp6 0 0 :::8081 :::* LISTEN 3538/java
tcp6 0 0 :::8019 :::* LISTEN 3538/java
Turns out I had a firewall on.
Since this is an internal site I disabled it by
systemctl stop firewalld
Would it be worth my time to just allow those ports access?

Blank Firefox Window Issue in Selenium PHPUnit Test in Linux Mint

I was trying to test out a page of mine using Selenium and phpunit. I had coded it properly and tried it out on a Ubuntu 14.04 machine. It tested out properly.
However I do not remember the version of selenium server and firefox used.
Now after some issues, I had removed Ubuntu and intalled Mint on my system.
While testing the page, I get a lot of error messages and a blank firefox screen.
Current version of firefox is 30 and Selenium 2.4.2
Tried with firefox versions 25,26,27,30.
I have posted the codes below.
Any help will be appreciated.
Output of Selenium starting
java -jar selenium-server-standalone-2.42.2.jar25 Jun, 2014 3:36:17 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
15:36:17.264 INFO - Java: Sun Microsystems Inc. 20.45-b01
15:36:17.264 INFO - OS: Linux 3.13.0-24-generic amd64
15:36:17.280 INFO - v2.42.2, with Core v2.42.2. Built from revision 6a6995d
15:36:17.347 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
15:36:17.398 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
15:36:17.399 INFO - Version Jetty/5.1.x
15:36:17.400 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
15:36:17.401 INFO - Started HttpContext[/selenium-server,/selenium-server]
15:36:17.401 INFO - Started HttpContext[/,/]
15:36:17.419 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#a39ab89
15:36:17.419 INFO - Started HttpContext[/wd,/wd]
15:36:17.422 INFO - Started SocketListener on 0.0.0.0:4444
15:36:17.422 INFO - Started org.openqa.jetty.jetty.Server#5abb7465
Output of Running a PHPUnit Test
phpunit testBooking.php
PHPUnit 3.7.28 by Sebastian Bergmann.
E
Time: 5.24 seconds, Memory: 3.00Mb
There was 1 error:
1) TestBookingBlockDate::testBlock
RuntimeException: POST /session/url
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'
System info: host: 'Sworoop', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-24-generic', java.version: '1.6.0_45'
Driver info: driver.version: unknown
/var/www/Folder/UnitTests/TurningStone/testBooking.php:13
/var/www/Folder/UnitTests/TurningStone/testBooking.php:13
FAILURES!
Tests: 1, Assertions: 1, Errors: 1.
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'DELETE /session
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'
System info: host: 'Sworoop', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-24-generic', java.version: '1.6.0_45'
Driver info: driver.version: unknown' in /usr/share/php/PHPUnit/Extensions/Selenium2TestCase/Driver.php:127
Stack trace:
#0 /usr/share/php/PHPUnit/Extensions/Selenium2TestCase/Session.php(137): PHPUnit_Extensions_Selenium2TestCase_Driver->curl('DELETE', Object(PHPUnit_Extensions_Selenium2TestCase_URL))
#1 /usr/share/php/PHPUnit/Extensions/Selenium2TestCase/Session.php(117): PHPUnit_Extensions_Selenium2TestCase_Session->stop()
#2 [internal function]: PHPUnit_Extensions_Selenium2TestCase_Session->__destruct()
#3 {main}
thrown in /usr/share/php/PHPUnit/Extensions/Selenium2TestCase/Driver.php on line 127
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
During this I get a blank firefox window which I have to manually close.
Solved it after reinstalling PHPUnit using composer instead of apt.
Thanks everyone :)

Resources