Can not run `Karma` tests on Linux server - phantomjs

I setup karma tests on my project and runs well on my Mac OSX.
However it fails on my linux server.
server info:
$ uname -a
Linux sz-mc-01 3.13.0-65-generic #106-Ubuntu SMP Fri Oct 2 22:08:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
error output:
26 04 2016 15:06:38.065:INFO [launcher]: Starting browser PhantomJS
26 04 2016 15:06:38.069:ERROR [launcher]: No binary for PhantomJS browser on your platform.
Please, set "PHANTOMJS_BIN" env variable.
I set "PHANTOMJS_BIN" and rerun, the error is
$ export PHANTOMJS_BIN=node_modules/phantomjs/bin/phantomjs
26 04 2016 15:20:32.857:INFO [launcher]: Starting browser PhantomJS
26 04 2016 15:20:32.935:ERROR [phantomjs.launcher]: internal/child_process.js:274
var err = this._handle.spawn(options);
^
TypeError: Bad argument
at TypeError (native)
at ChildProcess.spawn (internal/child_process.js:274:26)
at exports.spawn (child_process.js:362:9)
at Object.<anonymous> (/mnt/jenkins/workspace/Website_BridgePlus/node_modules/phantomjs/bin/phantomjs:22:10)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:429:10)
at startup (node.js:139:18)
26 04 2016 15:20:32.937:ERROR [launcher]: Cannot start PhantomJS
Any ideas?

Related

Getting error in jenkins with test coverage after upgrading from Angular 9 to Angular14

Can someone please point me how to debug this issue further. Get below error when jenkins job is run and the application is one Angular 14.
[32m13 10 2022 23:01:01.881:INFO [karma-server]: [39mKarma v6.4.1 server started at http://localhost:9876/
[32m13 10 2022 23:01:01.884:INFO [launcher]: [39mLaunching browsers ChromeHeadless with concurrency unlimited
[32m13 10 2022 23:01:01.887:INFO [launcher]: [39mStarting browser ChromeHeadless
[32m13 10 2022 23:01:03.202:INFO [Chrome Headless 63.0.3239.132 (Linux x86_64)]: [39mConnected on socket ajz1GfKScPy5uAgXAAAB with id 803388
Chrome Headless 63.0.3239.132 (Linux x86_64): Executed 0 of 0[32m SUCCESS[39m (0 secs / 0 secs)
[1A[2K[31mChrome Headless 63.0.3239.132 (Linux x86_64) ERROR[39m
An error was thrown in afterAll
Uncaught SyntaxError: Unexpected token {
SyntaxError: Unexpected token {
Uncaught SyntaxError: Unexpected token .
SyntaxError: Unexpected token .

React Native Expo Error. What should I do?

This is the Error :--
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #7: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:51 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #6: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:51 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #5: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:51 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #4: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:52 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #1: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:52 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #2: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:53 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #3: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:53 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #0: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:53 GMT
Error: ./gradlew exited with signal: SIGKILL
at ChildProcess.completionListener (/app/turtle/node_modules/#expo/xdl/node_modules/#expo/spawn-async/build/spawnAsync.js:51:23)
at Object.onceWrapper (events.js:418:26)
at ChildProcess.emit (events.js:311:20)
at ChildProcess.EventEmitter.emit (domain.js:482:12)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
...
at spawnAsync (/app/turtle/node_modules/#expo/xdl/node_modules/#expo/spawn-async/build/spawnAsync.js:17:21)
at spawnAsyncThrowError (/app/turtle/node_modules/#expo/xdl/build/detach/ExponentTools.js:201:45)
at buildShellAppAsync (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidShellApp.js:976:11)
at async Object.createAndroidShellAppAsync (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidShellApp.js:396:5)
at async runShellAppBuilder (/app/turtle/build/builders/android.js:95:9)
at async Object.buildAndroid [as android] (/app/turtle/build/builders/android.js:43:28)
at async build (/app/turtle/build/jobManager.js:181:33)
at async processJob (/app/turtle/build/jobManager.js:118:32)
at async Object.doJob (/app/turtle/build/jobManager.js:49:5)
at async main (/app/turtle/build/server.js:66:13)
This error is with Expo React Native.
Everything was working fine until I ran the command expo build:android
Here is the URL to all of the Logs
Abhyuday Tripathi
In my case I just closed and re-open the terminal and ran below command:
expo build:android -t apk
Do nothing, just try again. It is not your problem.
I ran into a very similar error after updating my global Expo npm package.
For some reason, an app that would always build crashed during building with that error.
As I hadn't done any changes to the actual app, I deleted the app/project from
expo.io, and rebuilt it with the expo build command. This made the build succeed.
I'm just leaving this here as an answer, in case someone runs into the same error after updating Expo.
First time I had this problem, reason was I've used an invalid slug name in app.json, there must be a dash between the words as below :
"expo": {
"slug": "My-App",
After a while I had the same problem,
I've realized that my expo-cli version wasn't latest one, I've
updated it
Just closed and re-opened the VS Code and terminal as
Zain said above in this page

Can't Apache2 start erorr: Can't locate SOAP/Transport/HTTP.pm

I have a problem with apache2 start.
When I try apache start i have the message:
root#ocsi:/var/log/apache2# **systemctl start apache2.service**
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
in systemctl status apache2.service
root#ocsi:/var/log/apache2# systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-06-01 07:53:07 CEST; 19s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 3142 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Jun 01 07:53:07 ocsi systemd[1]: Starting The Apache HTTP Server...
Jun 01 07:53:07 ocsi apachectl[3142]: Action 'start' failed.
Jun 01 07:53:07 ocsi apachectl[3142]: The Apache error log may have more information.
Jun 01 07:53:07 ocsi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jun 01 07:53:07 ocsi systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 01 07:53:07 ocsi systemd[1]: Failed to start The Apache HTTP Server.
in journalctl -xe
root#ocsi:/var/log/apache2# journalctl -xe
Jun 01 07:54:31 ocsi multipathd[700]: sda: add missing path
Jun 01 07:54:31 ocsi multipathd[700]: sda: failed to get udev uid: Invalid argument
Jun 01 07:54:31 ocsi multipathd[700]: sda: failed to get sysfs uid: Invalid argument
Jun 01 07:54:31 ocsi multipathd[700]: sda: failed to get sgio uid: No such file or directory
and in apache2 log is:
root#ocsi:/var/log/apache2# vi error.log
[Mon Jun 01 07:53:07.305344 2020] [perl:error] [pid 3149] Can't locate SOAP/Transport/HTTP.pm in #INC (you may need to install the SOAP::Transport::HTTP module) (#INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /etc/apache2) at /usr/local/share/perl/5.30.0/Apache/Ocsinventory/Plugins/Apache.pm line 25.\nBEGIN failed--compilation aborted at /usr/local/share/perl/5.30.0/Apache/Ocsinventory/Plugins/Apache.pm line 25.\nCompilation failed in require at (eval 16) line 1.\n
[Mon Jun 01 07:53:07.305621 2020] [perl:error] [pid 3149] Can't load Perl module Apache::Ocsinventory::Plugins::Apache for server localhost:0, exiting...
My system:
PHP Version : 7.4.3
Server version: Apache/2.4.41 (Ubuntu)
Description: Ubuntu 20.04 LTS
Ubuntu Linux 5.4.0-33-generic x86_64
How can I fix this error?
Looks like you need to install the SOAP::Lite module. That can be done by running:
$ sudo apt-get install libsoap-lite-perl
For more details, read on.
The error message is telling you that the Perl compiler can't find the module SOAP::Transport::HTTP (which is presumably used in some code used in your Apache start-up).
This module has never been part of a standard Perl distribution (you can test that by running corelist SOAP::Transport::HTTP). It, therefore, needs to be installed separately.
Perl modules are usually installed from CPAN. If you search for the module there, you'll see it's part of the SOAP-Lite distribution. Now you could install it directly from there using cpan but, given in this case, the easier approach is probably to install the pre-built package for your operating system. And that's done by running the command above.

dnf crashes with segmentation fault

Fedora 4.10.8-200.fc25.i686+PAE
dnf is crashing with 'segmentation fault (core dumped)'.
I have tried to run 'dnf clean all' without success.
When running 'dnf upgrade', this is logged in dnf.log:
Apr 30 20:17:21 INFO --- logging initialized ---
Apr 30 20:17:21 DDEBUG timer: config: 7 ms
Apr 30 20:17:21 DEBUG cachedir: /var/cache/dnf
Apr 30 20:17:21 DEBUG Loaded plugins: reposync, Query, noroot, needs-restarting, protected_packages, builddep, playground, config-manager, copr, download, system-upgrade, debuginfo-install, generate_completion_cache
Apr 30 20:17:21 DEBUG DNF version: 1.1.10
Apr 30 20:17:21 DDEBUG Command: dnf upgrade
Apr 30 20:17:21 DDEBUG Installroot: /
Apr 30 20:17:21 DDEBUG Releasever: 25
Apr 30 20:17:21 DDEBUG Base command: upgrade
Apr 30 20:17:21 DDEBUG Extra commands: []
Apr 30 20:17:51 DDEBUG repo: downloading from remote: updates, _Handle: metalnk: https://mirrors.fedoraproject.org/metalink?repo=updates-released-f25&arch=i386, mlist: None, urls [].
This is logged in 'messages':
Apr 30 20:17:51 emil2 audit: ANOM_ABEND auid=0 uid=0 gid=0 ses=10 pid=23817 comm="dnf" exe="/usr/libexec/system-python" sig=11
Apr 30 20:17:51 emil2 kernel: dnf[23817]: segfault at 24 ip b64a9c81 sp bfe10cc0 error 4 in libssl3.so[b6496000+49000]
Apr 30 20:17:51 emil2 abrt-hook-ccpp: Process 23817 (system-python) of user 0 killed by SIGSEGV - dumping core
Apr 30 20:17:52 emil2 abrt-server: Deleting problem directory ccpp-2017-04-30-20:17:51-23817 (dup of ccpp-2017-04-28-22:02:01-6627)
Apr 30 20:17:52 emil2 dbus-daemon[721]: [system] Activating service name='org.freedesktop.problems' requested by ':1.699' (uid=0 pid=23827 comm="/usr/bin/python3 /usr/bin/abrt-action-notify -d /v") (using servicehelper)
Apr 30 20:17:52 emil2 dbus-daemon[721]: [system] Successfully activated service 'org.freedesktop.problems'
What can I do to troubleshoot?
Got the same problem after upgrade
libdb-5.3.28-16 to libdb-5.3.28-24
libdb-utils-5.3.28-16 to libdb-utils-5.3.28-24
Rebuild the rpm db fixed it
% rm /var/lib/rpm/__db*
% rpm --rebuilddb

ubuntu guest on RHEL kvm *(x86_64) is failing

I have a x86_64 m/c and i successfully installed Sles12 and RHEL7 guests on this m/c. But while creating a ubuntu guest (64 bit), this is failing.
virt-install --name=ubuntu1 --virt-type=kvm --boot cdrom,hd --network=default,model=virtio --disk /dev/dm-13,size=300,format=raw,bus=virtio,cache=none,sparse=true --memory=8192 --vcpu=2 --location=/home/suse/ubuntu-16.04-server-amd64.iso --console pty,target_type=serial --graphics none --extra-args 'console=ttyS0,115200n8 serial'
Starting install...
Retrieving file info... | 134 B 00:00:00
Retrieving file version.info... |116 B 00:00:00
ERROR Couldn't find hvm kernel for Ubuntu tree.
lsmod|grep kvm
kvm_intel 162153 8
kvm 525259 1 kvm_intel
While running with debug, this is expecting i386 ?
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:1169) Regex didn't match, not a ALT Linux distro
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:196) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.VxW9Li/current/images/MANIFEST
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:101) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.VxW9Li/install/netboot/version.info
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:112) Saved file to /var/lib/libvirt/boot/virtinst-version.info.C0NcW7
Retrieving file version.info... |116 B 00:00:00
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:446) Detected distro name=Ubuntu osvariant=linux
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:196) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.VxW9Li/install/netboot/ubuntu-installer/i386/linux
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:243) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.VxW9Li
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (cli:295) File "/usr/share/virt-manager/virt-install", line 1084, in <module>
sys.exit(main())
File "/usr/share/virt-manager/virt-install", line 1078, in main
start_install(guest, continue_inst, options)
Can someone pls suggest?
From debug, it can be see it is indeed looking for i386, which is "default arch".
Exact same problem has been tackled in askubuntu q/a and has been patched to detect architecture from ISO name correctly.
Virt-manager with the patch does not have official release, so one would need to run virt-manager from sources or tinker with existing installation by changing and compiling /usr/share/virt-manager/virtinst/urlfetcher.py file.