Webdriver (selenium-standalone) tests with chromium - not starting ECONNREFUSED (on Apple M1) - docker

our end to end tests run in a docker container and use Webdriver.io - with selenium-standalone.
Since updating to an M1/arm64 Mac I've been trying to update the tests to run.
Our unit tests (jest) were fixed easily by changing from using the ./google-chrome-stable_current_amd64.deb to using chromium.
Test container dockerfile:
FROM node:14-bullseye
ENV CHROME_BIN=/usr/bin/chromium
RUN apt-get update \
&& apt-get install -y chromium \
openjdk-11-jre \
xvfb \
x11vnc \
php \
&& mkdir ~/.vnc \
&& x11vnc -storepasswd "fakepwd" ~/.vnc/passwd \
&& rm -rf /var/lib/apt/lists/*
COPY ./entrypoint.sh /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"]
I hoped it would be as simple for webdriver tests but no luck so far.
I've upgraded #wdio packages as below:
"#wdio/allure-reporter": "^7.10.1",
"#wdio/cli": "^7.19.3",
"#wdio/devtools-service": "^7.19.3",
"#wdio/junit-reporter": "^7.19.1",
"#wdio/local-runner": "^7.19.3",
"#wdio/mocha-framework": "^7.19.3",
"#wdio/selenium-standalone-service": "^7.19.1",
"#wdio/sync": "^7.19.3",
In the lock file I've confirmed the selenium-standalone version is 7.1.
(As above we use 7.19.1 of #wdio's service - this uses ^7.0 but only 7.1 works for M1's: https://github.com/webdriverio/selenium-standalone/commit/10e31d0e20444b0f6eb2d897cb3b471782dd243d)
I've confirmed that the correct chromedriver binary is used too (under ./node_modules/selenium-standalone/.selenium/chromedriver is 99.0.4844.51-arm64)
From wdio.conf.js:
services:[['selenium-standalone',{
installArgs: {
drivers: {
chrome: {
binary: '/usr/bin/chromium',
version: chromeDriverVersion,
arch : process.arch,
baseURL : 'https://chromedriver.storage.googleapis.com'
}
}
},
args: {
drivers: {
chrome: {
binary: '/usr/bin/chromium',
version: chromeDriverVersion,
arch : process.arch
}
}
}
}]];
capabilities: [{
browserName: process.env._BROWSER,
acceptInsecureCerts: true,
maxInstances: 4,
'goog:browserOptions': {
binary: '/usr/bin/chromium', // may not be needed, tried anyway
args: process.env._ENABLE_UI === 'false' ?
['--disable-dev-shm-usage','--no-sandbox','--headless','--disable-infobars','--deterministic-fetch', `--window-size=${default_viewport_width},${default_viewport_height}`] :
['--disable-dev-shm-usage','--no-sandbox','--disable-infobars', `--window-size=${default_viewport_width},${default_viewport_height}`]
}
}],
Watching wdio log outputs:
2022-04-01T08:09:37.336Z WARN #wdio/utils:shim: You are running tests with #wdio/sync which will be discontinued starting Node.js v16.Read more on https://github.com/webdriverio/webdriverio/discussions/6702
2022-04-01T08:09:40.101Z INFO #wdio/local-runner: Run worker command: run
2022-04-01T08:09:40.124Z DEBUG #wdio/config:ConfigParser: No compiler found, continue without compiling files
2022-04-01T08:09:42.042Z DEBUG #wdio/local-runner:utils: init remote session
2022-04-01T08:09:42.048Z DEBUG #wdio/utils:initialiseServices: initialise service "selenium-standalone" as NPM package
2022-04-01T08:09:42.648Z DEBUG #wdio/sync: Finished to run "beforeSession" hook in 0ms
2022-04-01T08:09:44.535Z DEBUG #wdio/local-runner:utils: init remote session
2022-04-01T08:09:44.536Z INFO webdriver: Initiate new session using the WebDriver protocol
2022-04-01T08:09:44.585Z INFO webdriver: [POST] http://127.0.0.1:4433/wd/hub/session
2022-04-01T08:09:44.586Z INFO webdriver: DATA {
capabilities: {
alwaysMatch: {
browserName: 'chromium',
acceptInsecureCerts: true,
'goog:browserOptions': [Object]
},
firstMatch: [ {} ]
},
desiredCapabilities: {
browserName: 'chromium',
acceptInsecureCerts: true,
'goog:browserOptions': { binary: '/usr/bin/chromium', args: [Array] }
}
}
2022-04-01T08:09:44.600Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4433
at ClientRequest.<anonymous> (/srv/api/author/node_modules/got/dist/source/core/index.js:956:111)
at Object.onceWrapper (events.js:520:26)
at ClientRequest.emit (events.js:412:35)
at ClientRequest.emit (domain.js:475:12)
at ClientRequest.origin.emit (/srv/api/author/node_modules/#szmarczak/http-timer/dist/source/index.js:43:20)
at Socket.socketErrorListener (_http_client.js:475:9)
at Socket.emit (events.js:400:28)
at Socket.emit (domain.js:475:12)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16)
2022-04-01T08:09:44.601Z ERROR #wdio/runner: Error: Failed to create session.
Unable to connect to "http://127.0.0.1:4433/wd/hub", make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
at startWebDriverSession (/srv/api/author/node_modules/webdriver/build/utils.js:72:15)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Function.newSession (/srv/api/author/node_modules/webdriver/build/index.js:46:45)
at async remote (/srv/api/author/node_modules/#wdio/runner/node_modules/webdriverio/build/index.js:77:22)
at async Runner._startSession (/srv/api/author/node_modules/#wdio/runner/build/index.js:223:56)
at async Runner._initSession (/srv/api/author/node_modules/#wdio/runner/build/index.js:176:25)
at async Runner.run (/srv/api/author/node_modules/#wdio/runner/build/index.js:88:19)
2022-04-01T08:09:44.601Z DEBUG #wdio/sync: Finished to run "after" hook in 0ms
I presume it's chromium having an issue starting - but I can't find any relevant logs.
I've tried to start it inside the container manually, but I have no idea if there's anything useful here:
root#15adddf1e180:/srv/mydir# export DISPLAY=:99
root#15adddf1e180:/srv/mydir# /usr/bin/Xvfb :99 -ac -screen 0 1920x1080x24 > /dev/null 2>&1 &
[1] 9
root#15adddf1e180:/srv/mydir# x11vnc -listen 0.0.0.0 -display :99.0 -usepw -forever -nevershared > /dev/null 2>&1 &
[2] 24
root#15adddf1e180:/srv/mydir# /usr/bin/chromium --no-sandbox
[25:67:0401/081257.532385:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:67:0401/081257.532481:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:66:0401/081257.540896:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[25:66:0401/081257.540933:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:66:0401/081257.571813:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[25:66:0401/081257.571995:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[25:25:0401/081257.619504:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
[25:89:0401/081257.630541:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:89:0401/081257.631138:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:89:0401/081257.631196:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:89:0401/081257.631336:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:89:0401/081257.631366:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.665149:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.679383:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.691523:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.701605:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.705098:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
[25:25:0401/081257.705122:FATAL:gpu_data_manager_impl_private.cc(447)] GPU process isn't usable. Goodbye.
*** stack smashing detected ***: terminated
[0401/081257.720823:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0401/081257.720915:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Trace/breakpoint trap
root#15adddf1e180:/srv/mydir#
Any help would be appreciated, thanks!

It turns out that the "drivers" section must use "chromium" and not "chrome"
And for "capabilities" it should be "chrome"
I can't explain why unfortunately as selenium/webdriver docs seem to only mention chrome as the driver, not chromium - but this is the only way to get it to work
I.e.
const drivers = {};
drivers[process.env._BROWSER] = {
binary: '/usr/bin/chromium',
version: chromeDriverVersion,
arch : process.arch,
baseURL : 'https://chromedriver.storage.googleapis.com'
};
services:[['selenium-standalone', {
installArgs: {
drivers: drivers
},
args: {
drivers: drivers
}
}]];
capabilities: [{
browserName: process.env._BROWSER === "chromium" ? "chrome" : process.env._BROWSER,
...

Related

Cypress failed to make a connection to the Edge/Firefox in Jenkins

I created some VueJS test and run with Cypress.
Everything is OK until I run it on Jenkins (with a GitHub hook trigger for GITScm polling)
Only cypress run --browser chrome and cypress run --browser electron work.
With Edge and Firefox, it returned this kind of error
Still waiting to connect to Edge, retrying in 1 second (attempt 62/62)
Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.
This usually indicates there was a problem opening the Edge browser.
The CDP port requested was 63444.
Error: connect ECONNREFUSED 127.0.0.1:63444
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
Error: Command failed with exit code 1: npm run cypress:run
at makeError (C:\ProgramData\Jenkins\.jenkins\workspace\Homepage\node_modules\start-server-and-test\node_modules\execa\lib\error.js:60:11)
at handlePromise (C:\ProgramData\Jenkins\.jenkins\workspace\Homepage\node_modules\start-server-and-test\node_modules\execa\index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
shortMessage: 'Command failed with exit code 1: npm run cypress:run',
command: 'npm run cypress:run',
escapedCommand: '"npm run cypress:run"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
How can I run it normally in Jenkins? Thanks in advance.

Nebula Graph fails on CentOS 6.5

Nebula Graph fails on CentOS 6.5, the error message is as follows:
# storage log
Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
# meta log
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E0415 22:32:38.944437 15532 AsyncServerSocket.cpp:762] failed to set SO_REUSEPORT on async server socket Protocol not available
E0415 22:32:38.945001 15510 ThriftServer.cpp:440] Got an exception while setting up the server: 92failed to bind to async server socket: [::]:0: Protocol not available
E0415 22:32:38.945057 15510 RaftexService.cpp:90] Setup the Raftex Service failed, error: 92failed to bind to async server socket: [::]:0: Protocol not available
E0415 22:32:38.949586 15463 NebulaStore.cpp:47] Start the raft service failed
E0415 22:32:38.949597 15463 MetaDaemon.cpp:88] Nebula store init failed
E0415 22:32:38.949796 15463 MetaDaemon.cpp:215] Init kv failed!
Nebula service status is as follows:
[root#redhat6 scripts]# ./nebula.service status all
[WARN] The maximum files allowed to open might be too few: 1024
[INFO] nebula-metad: Exited
[INFO] nebula-graphd: Exited
[INFO] nebula-storaged: Running as 15547, Listening on 44500
Reason for error: CentOS 6.5 system kernel version is 2.6.32, which is less than 3.9. However, SO_REUSEPORT only supports Linux 3.9 and above.
Upgrading the system to CentOS 7.5 can solve the problem by itself.

The request to open "com.XX.XX" failed The request was denied by service delegate only while using detox

Detox versions tried : 11.0.0, 12.0.0 & 14.5.1
The app runs fine when we run it via Xcode. The Detox build command succeeds as well.
But when I start running detox tests I will get the following error
"/bin/cat /dev/null >/Users/mmoha070/Library/Developer/CoreSimulator/Devices/AC24D39E-8290-4314-90F6-685007DBACA8/data/tmp/detox.last_launch_app_log.out 2>/Users/mmoha070/Library/Developer/CoreSimulator/Devices/AC24D39E-8290-4314-90F6-685007DBACA8/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/mmoha070/Library/Detox/ios/34981937206ec401dcf4fd6235cf1a8a3f71e719/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err AC24D39E-8290-4314-90F6-685007DBACA8 com.7ElevenNow.qa.PhoenixiOS --args -detoxServer ws://localhost:53701 -detoxSessionId 34083615-b6f2-86ea-3b33-84b27024f951" failed with code = 1, stdout and stderr:
detox[75658] ERROR: [exec.js/EXEC_FAIL, #6] com.7ElevenNow.qa.PhoenixiOS: -1
detox[75658] ERROR: [exec.js/EXEC_FAIL, #6] An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.7ElevenNow.qa.PhoenixiOS" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified.
Underlying error (domain=FBSOpenApplicationErrorDomain, code=1):
The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.)

Running a bitcoin node on regtest network fails

I'm trying to run a bitcoin network on regtest with this version of bitcoin node so I can test out bitpay's insight-ui block explorer.
Running on regtest I get this repeating error
Assertion failed: (psocket), function Shutdown, file zmq/zmqpublishnotifier.cpp, line 92.
[2017-05-19T00:42:44.515Z] warn: Bitcoin process unexpectedly exited with code: null
[2017-05-19T00:42:44.515Z] warn: Restarting bitcoin child process in 5000ms
[2017-05-19T00:42:49.516Z] info: Using bitcoin config file: /Users/harshagoli/BTCT/bitcoin.conf
[2017-05-19T00:42:49.517Z] warn: Stopping existing spawned bitcoin process with pid: 12690
[2017-05-19T00:42:49.517Z] warn: Unclean bitcoin process shutdown, process not found with pid: 12690
[2017-05-19T00:42:49.517Z] info: Starting bitcoin process
Which eventually becomes
[2017-05-19T00:42:54.133Z] error: RPCError: Bitcoin JSON-RPC: Request Error: connect ECONNREFUSED 127.0.0.1:8332
at Bitcoin._wrapRPCError (/Users/harshagoli/mynode/node_modules/bitcore-node/lib/services/bitcoind.js:449:13)
at /Users/harshagoli/mynode/node_modules/bitcore-node/lib/services/bitcoind.js:781:28
at ClientRequest.<anonymous> (/Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/bitcoind-rpc/lib/index.js:116:7)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:269:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1269:8)
at nextTickCallbackWith2Args (node.js:458:9)
[2017-05-19T00:42:54.133Z] info: Beginning shutdown
[2017-05-19T00:42:54.133Z] info: Stopping insight-ui (not started)
[2017-05-19T00:42:54.134Z] info: Stopping insight-api (not started)
[2017-05-19T00:42:54.134Z] info: Stopping web (not started)
[2017-05-19T00:42:54.135Z] info: Stopping bitcoind
After which I have the reoccurring error
[2017-05-19T00:42:54.221Z] error: Error: Stopping while trying to spawn bitcoind.
at /Users/harshagoli/mynode/node_modules/bitcore-node/lib/services/bitcoind.js:905:25
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:676:51
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:726:13
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:52:16
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:264:21
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:44:16
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:723:17
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:167:37
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:652:25
at /Users/harshagoli/mynode/node_modules/bitcore-node/lib/services/bitcoind.js:887:16
Thoughts on how I can get this up and running with a block to look at so I can use the block explorer?
Okay I figured it out. What was happening is there were some other bitcoind processes that had zombied out and were listening on the port this process was trying to access. I ran this command to kill the other processes
killall -9 bitcoind
Also, to create more blocks on regtest (while in the your node directory) use this command.
./node_modules/bitcore-node/bin/bitcoin-0.12.1/bin/bitcoin-cli -datadir=/Users/harshagoli/mynode/data -regtest generate 150

jhipster - error executing task :bower

I am having an issue building my app based off jhipster, using gradle. It fails on task :bower. The exact error I get is:
./gradlew bower --debug
20:23:46.154 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':bower'.
20:23:46.174 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command 'node''. Working directory: /workplace/zupus Command: node /workplace/zupus/node_modules/bower/bin/bower install
20:23:46.174 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Environment for process 'command 'node'': {PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jav a-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin, CMD_DURATION=7.19s, XAUTHORITY=/home/brendan/.Xauthority, __fish_help_dir=/usr/share/doc/fish, XMODIFIERS=#im=i bus, XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/, GDMSESSION=ubuntu, MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path, TEXTDOMAINDIR=/usr/share/locale/, GTK _IM_MODULE=ibus, DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-2jqL9U4Ofh, DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path, XDG_CURRENT_DESKTOP=Unity, SSH_AGENT_PID=2238, COLORTERM=gn ome-terminal, QT4_IM_MODULE=xim, UPSTART_SESSION=unix:abstract=/com/ubuntu/ups tart- session/1000/2169, SESSION_MANAGER=local/brendan-home:#/tmp/.ICE-unix/2337,unix/brendan-home:/tmp/.ICE-unix/233 7, LOGNAME=brendan, JOB=dbus, PWD=/workplace/zupus, IM_CONFIG_PHASE=1, DERBY_HOME=/usr/lib/jvm/java-8-oracle/db, LANGUAGE=en_US, WINDOWID=75497483, SHELL=/usr/bin/fish, __fish_bin_di r=/usr/bin, INSTANCE=, J2SDKDIR=/usr/lib/jvm/java-8-oracle, OLDPWD=/wor kplace/zupus, GNOME_DESKTOP_SESSION_ID=this-is-deprecated, J2REDIR=/usr/lib/jvm/java-8-oracle/jre, GTK_MODULES=overlay-scroll bar:unity-gtk-module, CLUTTER_IM_MODULE=xim, TEXTDOMAIN=im-config, XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0, COMPIZ_BIN_PATH=/usr/bin/, SESSIONTYPE=gnome-session , LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41: sg =30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*. taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;3 1: *.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*. deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpi o= 01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm= 01;35:*. pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.sv gz =01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.m kv=01;35:* .webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.a sf =01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl =01;35:*. dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx= 01 ;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3= 00;36:*. mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:, SSH_AGENT_LAUNC HE R=upstart, SHLVL=1, __fish_sysconfdir=/etc/fish, COMPIZ_CONFIG_PROFILE=ubuntu, QT_IM_MODULE=ibus, JAVA_HOME=/usr/lib/jvm/java-8-oracle, TERM=xterm, XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt , XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg, LANG=en_US .UTF-8, XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0, GNOME_KEYRING_CONTROL=/run/user/1000/keyring-k4czcd, XDG_S ES SION_ID=c2, SELINUX_INIT=YES, DISPLAY=:0, NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript, GDM_LANG=en_US, UBUNTU_MENUPROXY=1, XDG_ GR EETER_DATA_DIR=/var/lib/lightdm-data/brend an, DESKTOP_SESSION=ubuntu, GPG_AGENT_INFO=/run/user/1000/keyring-k4czcd/gpg:0:1, SESSION=ubuntu, USER=brendan, XDG_MENU_PREFIX=gnome-, VTE _V ERSION=3409, XDG_SEAT=seat0, SSH_AUTH_SOCK =/run/user/1000/keyring-k4czcd/ssh, NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat, QT_QPA_PLATFORMTHEME=appmenu-qt5, XDG_RUNTIME_DIR=/run/user/1000, XDG_VT NR =7, HOME=/home/brendan, __fish_datadir=/us r/share/fish, GNOME_KEYRING_PID=2165 }
20:23:46.175 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
20:23:46.175 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process start ed: command 'node'.
20:23:46.179 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
20:23:46.179 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are h a ndled...
20:23:46.179 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started proces s 'command 'node''
20:23:46.187 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
20:23:46.188 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'node'' fi nished with exit value 1 (state: FAILED)
20:23:46.188 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] F in ished executing task ':bower'
20:23:46.188 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :bower FAILED
20:23:46.189 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :bower (Thread[mai n,5,main]) completed. Took 0.036 secs.
20:23:46.189 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor ] Task worker [Thre ad[main,5,main]] finished, busy: 0.899 secs, idle: 0.001 secs
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter]
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception .
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter]
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':bower'.
20:23:46.195 [ERROR] [org.gradle.BuildExceptionReporter] > Process 'command 'node'' finished wit h non-zero exit value 1
20:23:46.195 [ERROR] [org.gradle.BuildExceptionReporter]
20:23:46.195 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
20:23:46.195 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
20:23:46.195 [LIFECYCLE] [org.gradle.BuildResultLogger]
20:23:46.196 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
20:23:46.196 [LIFECYCLE] [org.gradle.BuildResultLogger]
20:23:46.197 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 3.275 secs
I have a feeling it has to do with global vs local npm installs, but I'm scratching my head about how to fix it or even find the error. I'm hoping someone else can save me from more hours of frustration.
Thanks
Fixed this eventually, if anyone else stumbles across this the answer was that I had to uninstall node (i.e. sudo apt-get remove node) and leave nodejs in place. You should see this:
user#user /w/zupus> which node
/usr/bin/node
user#user /w/zupus> which nodejs
/usr/bin/nodejs
This is my quick and dirty fix on Mac OS:
I just ran npm install bower as sudo
sudo npm install -g bower
I used windows 7 and got this error. I was able to fix this issue by installing Git. Make sure that you close the current command prompt window and try again.
just do npm install bower in project root directory where bower.json file should present.

Resources