CircleCI: job for test using karma - circleci

I try to run unit-tests on CI in my project, but for some reason, I get the error Please set env variable CHROME_BIN.
So, I add environment: - CHROME_BIN=/usr/bin/google-chrome, but it still doesn't work. I also try setting the browser to ChromeHeadless in the karma.config file by using config.set({browsers: ['ChromeHeadless']}). Does anyone have an idea what might be the issue?
Here is code of my test job:
test:
docker:
- image: cimg/node:16.19.0-browsers
environment:
- CHROME_BIN=/usr/bin/google-chrome
steps:
- checkout
- run: npm install
- run:
command: npm test
Here is error from CI:
#!/bin/bash -eo pipefail
npm test
> api-data#0.0.0 test
> ng test
- Generating browser application bundles (phase: setup)...
✔ Browser application bundle generation complete.
07 01 2023 23:22:42.949:WARN [karma]: No captured browser, open http://localhost:9876/
07 01 2023 23:22:42.959:INFO [karma-server]: Karma v6.4.1 server started at http://localhost:9876/
07 01 2023 23:22:42.959:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
07 01 2023 23:22:42.961:INFO [launcher]: Starting browser Chrome
07 01 2023 23:22:43.020:ERROR [launcher]: Cannot start Chrome
Can not find the binary /usr/bin/google-chrome
Please set env variable CHROME_BIN
07 01 2023 23:22:43.020:ERROR [launcher]: Chrome stdout:
07 01 2023 23:22:43.020:ERROR [launcher]: Chrome stderr:

Related

Gluon Mobile not compiling on WSL2 Ubuntu 20.04

Ive been trying to create an apk file for my gluon project. On windows and for windows, the prroject runs perfectly but when in Ubuntu, the commands mvn -Pandroid gluonfx:runagent will run the project but the project wont compile and build.
the error I get keep getting is:
[Wed Jan 04 15:32:35 IST 2023][INFO] We will now compile your code for aarch64-linux-android. This may take some time.[Wed Jan 04 15:33:01 IST 2023][INFO] Additional information: Objectfile should be called com.gluonapplication.mobiletrial1.o but we didn't find that under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm[Wed Jan 04 15:33:01 IST 2023][SEVERE] Compiling failed.Check the log files under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/logAnd please check https://docs.gluonhq.com/ for more information.[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 45.283 s[INFO] Finished at: 2023-01-04T15:33:01+05:30[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.15:compile (default-cli) on project mobiletrial1: Compiling failed -> [Help 1]
The log file
[Wed Jan 04 16:48:54 IST 2023][FINE] PB Command for compile: /mnt/c/Java/linux/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:+ExitAfterRelocatableImageWrite --features=org.graalvm.home.HomeFinderFeature -H:TempDirectory=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/tmp -H:EnableURLProtocols=http,https --initialize-at-build-time=com.gluonhq.charm.glisten.visual.MaterialDesignIcon -H:ReflectionConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/reflectionconfig-aarch64-android.json -H:JNIConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/jniconfig-aarch64-android.json -H:ResourceConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/resourceconfig-aarch64-android.json -H:-SpawnIsolates -Dsvm.targetArch=aarch64 -H:+ForceNoROSectionRelocations --libc=bionic -H:+UseCAPCache -H:CAPCacheDir=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/capcache -H:CompilerBackend=lir -H:IncludeResourceBundles=com/sun/javafx/scene/control/skin/resources/controls,com/sun/javafx/scene/control/skin/resources/controls-nt,com.sun.javafx.tk.quantum.QuantumMessagesBundle -Dsvm.platform=org.graalvm.nativeimage.Platform$LINUX_AARCH64 -cp /home/vatsal/.m2/repository/com/gluonhq/substrate/0.0.55/substrate-0.0.55.jar:/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/tmp/classpathJar.jar com.gluonapplication.MobileTrial1
[Wed Jan 04 16:48:54 IST 2023][FINE] Start process compile...
[Wed Jan 04 16:48:54 IST 2023][FINE] Result for compile: 0
[Wed Jan 04 16:48:54 IST 2023][FINE] Logging process [compile] to file: /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/log/process-compile-1672831134641.log
[Wed Jan 04 16:48:54 IST 2023][INFO] Additional information: Objectfile should be called com.gluonapplication.mobiletrial1.o but we didn't find that under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm
[Wed Jan 04 16:48:54 IST 2023][SEVERE] Compiling failed.
Check the log files under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
gluonfx log file
Process
=======
compile
Command Line
============
/mnt/c/Java/linux/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:+ExitAfterRelocatableImageWrite --features=org.graalvm.home.HomeFinderFeature --features=com.gluonhq.substrate.feature.GluonFeature -H:TempDirectory=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/tmp -H:EnableURLProtocols=http,https -H:ReflectionConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/reflectionconfig-x86_64-linux.json -H:JNIConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/jniconfig-x86_64-linux.json -H:ResourceConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/resourceconfig-x86_64-linux.json -H:IncludeResourceBundles=com/sun/javafx/scene/control/skin/resources/controls,com/sun/javafx/scene/control/skin/resources/controls-nt,com.sun.javafx.tk.quantum.QuantumMessagesBundle -Dsvm.platform=org.graalvm.nativeimage.Platform$LINUX_AMD64 -cp /home/vatsal/.m2/repository/com/gluonhq/substrate/0.0.55/substrate-0.0.55.jar:/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/tmp/classpathJar.jar com.gluonapplication.MobileTrial1
Output
======
Result
======
result: 0
I have tried uninstalling and reinstalling ubuntu and wsl and I have tried the same process on Linux and have got the same error.

redis json (redislabs/rejson:latest) on Heroku

I cannot figure this out. Hope I can get some help
I have a hobby tier in Heroku running django. To this I would like to attach a Redis service. However, I would like to use the recent rejson (redislabs/rejson:latest) docker image (instead of redistogo or heroku-redis)because it has json support. This works great on my local env. I was able to push the docker image into the container registry and actually start the redis server
2021-07-23T00:14:48.576294+00:00 app[worker.1]: 3:M 23 Jul 2021 00:14:48.576 # Current maximum open files is 10000. maxclients has been reduced to 9968 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
2021-07-23T00:14:48.577054+00:00 app[worker.1]: 3:M 23 Jul 2021 00:14:48.577 * Running mode=standalone, port=6379.
2021-07-23T00:14:48.577124+00:00 app[worker.1]: 3:M 23 Jul 2021 00:14:48.577 # Server initialized
2021-07-23T00:14:48.577184+00:00 app[worker.1]: 3:M 23 Jul 2021 00:14:48.577 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
2021-07-23T00:14:48.577671+00:00 app[worker.1]: 3:M 23 Jul 2021 00:14:48.577 # <ReJSON> JSON data type for Redis v1.0.7 [encver 0]
2021-07-23T00:14:48.577789+00:00 app[worker.1]: 3:M 23 Jul 2021 00:14:48.577 * Module 'ReJSON' loaded from /usr/lib/redis/modules/rejson.so
2021-07-23T00:14:48.578232+00:00 app[worker.1]: 3:M 23 Jul 2021 00:14:48.578 * Ready to accept connections
Unfortunately, django is unable to connect to it
ConnectionError: Error -2 connecting to redis://localhost:6379. Name or service not known
There are no ENV variable exposed, so am unable to set any (I mean I can set them, but doubt if they will be relevant)
I did experiment with installing redistogo add on and am able to connect to it (this required setting the connection based on the REDIS_URL env variable that gets exposed when redistogo is added)
At my wits end...any help appreciated...I guess the question really boils do to:

Lighthouse in GitLab CI

I'm trying to use Lighthouse in GitLab CI to run a scan against a remote website after a deploy. The job keeps throwing an error.
My job configuration looks like this:
lighthouse:
stage: scan
image: markhobson/node-chrome
script:
- npm install -g lighthouse lighthouse-plugin-field-performance --unsafe-perm
- lighthouse $URL --plugins=lighthouse-plugin-field-performance --chrome-flags=”--headless --no-sandbox” --verbose
I've also tried with image: buildkite/puppeteer. In both instances I get a similar error when I try to invoke Lighthouse, which looks like this:
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher:verbose created /tmp/lighthouse.KXhqWF0
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher:verbose Launching with command:
"/usr/bin/google-chrome-stable" --disable-translate --disable-extensions --disable-background-networking --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-first-run --remote-debugging-port=44495 --disable-setuid-sandbox --user-data-dir=/tmp/lighthouse.KXhqWF0 about:blank
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher:verbose Chrome running with pid 36 on port 44495.
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher Waiting for browser.
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher Waiting for browser...
Wed, 09 Oct 2019 20:22:43 GMT ChromeLauncher Waiting for browser.....
Wed, 09 Oct 2019 20:22:43 GMT ChromeLauncher Waiting for browser.......
Wed, 09 Oct 2019 20:22:44 GMT ChromeLauncher Waiting for browser.........
Wed, 09 Oct 2019 20:22:44 GMT ChromeLauncher Waiting for browser...........
etc
Wed, 09 Oct 2019 20:23:07 GMT ChromeLauncher:error connect ECONNREFUSED 127.0.0.1:44495
Wed, 09 Oct 2019 20:23:07 GMT ChromeLauncher:error Logging contents of /tmp/lighthouse.KXhqWF0/chrome-err.log
Wed, 09 Oct 2019 20:23:07 GMT ChromeLauncher:error
(google-chrome-stable:36): Gtk-WARNING **: cannot open display:
[1009/202244.656645:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
Unable to connect to Chrome
I'm not entirely sure what I need to do at this point. I'm questioning whether or not to try a more basic node image and try installing what I need manually, which I tried originally and found that managing Chrome/Chromium with Lighthouse was not quite as straight-forward as I wanted. Any thoughts or suggestions?
You could try using this image which has both everything installed ready to execute a report https://hub.docker.com/r/femtopixel/google-lighthouse/

Docker install on armv7

I am having trouble with my docker installation.
I rent a arm storage server for my setup.
The kernel is
4.5.2-armada375 #1 SMP Tue Oct 25 11:52:56 CEST 2016 armv7l
But when i try to insall docker-ce and the other packages ive got the following error:
Jul 09 20:54:50 storage-fr systemd[1]: Failed to start Docker Application Container Engine.
Jul 09 20:54:50 storage-fr systemd[1]: docker.service: Unit entered failed state.
Jul 09 20:54:50 storage-fr systemd[1]: docker.service: Failed with result 'exit-code'.
dpkg: error processing package docker-ce (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up liberror-perl (0.17024-1) ...
Setting up rename (0.20-4) ...
update-alternatives: using /usr/bin/file-rename to provide /usr/bin/rename (rename) in auto mode
Setting up aufs-dkms (4.9+20161219-1) ...
Loading new aufs-4.9+20161219 DKMS files...
It is likely that 4.5.2-armada375 belongs to a chroot's host
I think the kernel is not compatible.
IS it possible to install docker on it?
I tried this guide https://docs.docker.com/install/linux/docker-ce/debian/
But it doesnt work.
Any idea ?

Karma/PhantomJS Disconnect on Jenkins

Recently, if I do 2-3 builds in succession on Jenkins, my Karma task fails for the following reason:
Running "karma:jenkins" (karma) task
[32m13 02 2017 16:46:00.876:INFO [karma]: [39mKarma v1.3.0 server started at http://localhost:9018/
[32m13 02 2017 16:46:00.878:INFO [launcher]: [39mLaunching browser PhantomJS with unlimited concurrency
[32m13 02 2017 16:46:00.885:INFO [launcher]: [39mStarting browser PhantomJS
[32m13 02 2017 16:46:01.345:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: [39mConnected on socket /#lF481tq-G7blX6hpAAAA with id 85942733
[33m13 02 2017 16:46:11.346:WARN [PhantomJS 2.1.1 (Linux 0.0.0)]: [39mDisconnected (1 times), because no message in 10000 ms.
This is happening for me for both Karma: 1.3.0 AND 1.4.1. Same PhantomJS version on both builds. NPM version: 3.10.10
I've tried specifying the host, the address, and extending the timeout. I'm out of solutions, unfortunately.

Resources