Playwright tests are not running on gitlab CICD - gitlab

Hello,
While my Playwright tests are running perfectly on my local machine, on a remote gitlab machine they all fail.
The output looks like this:
$ cd playwright
$ npm ci
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
> cd .. && husky install front/.husky
husky - Git hooks installed
added 236 packages, and audited 237 packages in 25s
70 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$ npx playwright install
Downloading Chromium 105.0.5195.19 (playwright build v1019)...
| | 0% of 133.2 Mb
|■■■■■■■■ | 10% of 133.2 Mb
|■■■■■■■■■■■■■■■■ | 20% of 133.2 Mb
|■■■■■■■■■■■■■■■■■■■■■■■■ | 30% of 133.2 Mb
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 40% of 133.2 Mb
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 50% of 133.2 Mb
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 60% of 133.2 Mb
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 70% of 133.2 Mb
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 80% of 133.2 Mb
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 90% of 133.2 Mb
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 133.2 Mb
Chromium 105.0.5195.19 (playwright build v1019) downloaded to /ms-playwright/chromium-1019
$ npm run ci:test
npx playwright test --config=src/configs/playwright.prod.config.ts
Running 30 tests using 10 workers
and then a bunch of red tests names lines indicating failure:
✘ 2 [chromium] › account-settings.test.ts:12:3 › Account Settings functionality › validate account timezone modification (50s)
✘ 3 [chromium] › account-settings.test.ts:16:3 › Account Settings functionality › validate adding api key (50s)
page.goto: Timeout 50000ms exceeded.
7 | test.describe('Account Settings functionality', () => {
8 | test('validate account phone number modification', async ({ page }) => {
> 9 | await validateChangePhoneNumber({ page });
| ^
10 | });
...
29 failed
at Object.Account Settings (/builds/dashboard-client/playwright/src/support/navigate/navigateToPage.ts:91:28)
at navigationByPageName (/builds/dashboard-client/playwright/src/support/navigate/navigateToPage.ts:102:10)
at validateChangeTimezone (/builds/dashboard-client/playwright/src/support/validate/validateAccountSettings/validateChangeTimezome.ts:12:9)
at /builds/dashboard-client/playwright/src/tests/account-settings.test.ts:13:11
By looking at the recording it seems that the app is opened but no navigation step occurres until timeout exceeds.

The dependencies for Playwright are missing as indicated by the 'Downloading Chromium' progress indicators.
According to the documentation npx playwright install --with-deps will install the deps. Refer to: https://playwright.dev/docs/ci.

Related

Issue with deploying NodeJs app on Openode

I'm trying to deploy a very simple app on Openode. I use VSCode to code the app. I also use the command below:
openode deploy
in the terminal. But every time I get the log below:
[Wed May 04 2022 15:43:23] - [+] Authentication valid.
⠋ Sending files (trial 1) - file=./app.js size=421 operation=M
Sending files (trial 1) - file=./Dockerfile size=400 operation=C
Sending files (trial 1) - file=./package-lock.json size=576070 operation=M
Sending files (trial 1) - file=./package.json size=311 operation=M
⠴ 4/4
⠇ [info] Preparing instance image...
⠦ [info] ----------------------------- REMOTE BUILD OUTPUT ------------------------------
starting build "be7caca6-4d24-4fb8-868a-788fe21724fc"
FETCHSOURCE
Fetching storage object: gs://openode_cloudbuild/source/1651662817.856651- 4ca57dee159a459aad0de20597a0ea87.tgz#1651662818498367
Copying gs://openode_cloudbuild/source/1651662817.856651- 4ca57dee159a459aad0de20597a0ea87.tgz#1651662818498367...
/ [1 files][101.8 KiB/101.8 KiB]
Operation completed over 1 objects/101.8 KiB.
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker
Sending build context to Docker daemon 581.1kB
Step 1/8 : FROM node:16-alpine
16-alpine: Pulling from library/node
...
Digest: sha256:1a9a71ea86aad332aa7740316d4111ee1bd4e890df47d3b5eff3e5bded3b3d10
Status: Downloaded newer image for node:16-alpine
---> e5065cc78074
Step 2/8 : WORKDIR /opt/app
---> Running in 43eba802f064
Removing intermediate container 43eba802f064
---> 36eb952180bb
Step 3/8 : ENV PORT=80
---> Running in 52a96acb666c
Removing intermediate container 52a96acb666c
---> 142b3a4b0300
Step 4/8 : RUN echo 'crond' > /boot.sh
---> Running in 4bd61428068e
Removing intermediate container 4bd61428068e
---> 514493001fc5
Step 5/8 : COPY package*.json ./
---> 47992535fb05
Step 6/8 : RUN npm install --production
---> Running in 483bb82428b1
npm WARN deprecated strip-eof#2.0.0: Renamed to `strip-final-newline` to better represent its functionality.
npm WARN deprecated debug#4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated cli-ux#5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated cli-ux#5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated cli-ux#5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated cli-ux#5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated cli-ux#5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated cli-ux#5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
added 753 packages, and audited 754 packages in 33s
29 packages are looking for funding
run `npm fund` for details
20 vulnerabilities (8 moderate, 12 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 8.5.5 -> 8.8.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.8.0>
npm notice Run `npm install -g npm#8.8.0` to update!
npm notice
Removing intermediate container 483bb82428b1
---> 554d52fb54fd
Step 7/8 : COPY . .
---> 438b64e10f1c
Step 8/8 : CMD sh /boot.sh && npm start
---> Running in 8e1ee006be51
Removing intermediate container 8e1ee006be51
---> ee70ea9d469a
Successfully built ee70ea9d469a
Successfully tagged gcr.io/openode/tert2:tert2--30794--1712208
PUSH
Pushing gcr.io/openode/tert2:tert2--30794--1712208
The push refers to repository [gcr.io/openode/tert2]
...
tert2--30794--1712208: digest: sha256:c10cd20b145af3d939b461a2612779f31ffc9e4ed1cd095e92065b3104941d1f size: 2204
DONE
--------------------------------------------------------------------------------
[info] Deploying instance...
⠼ [error] Deploying container to Cloud Run service [instance-30794] in project [openode] region [europe-west1]
Deploying new service...
Setting IAM Policy..................done
Creating Revision................................................................................................................................................................................................failed
Deployment failed
ERROR: (gcloud.run.deploy) Cloud Run error: The user-provided container failed to start and listen on the port defined provided by the PORT=80
environment variable. Logs for this revision might contain more information.
⠴ [error] Unable to deploy the instance with success
[info] Finalizing...
[info] Stopping instance...
⠴ [info]
*** Final Deployment state: FAILED ***
[info] ...finalized.
As it can be observed in the log, it looks like the main error lays in this part: ERROR: (gcloud.run.deploy) Cloud Run error: The user-provided container failed to start and listen on the port defined provided by the PORT=80 .
I have seen a post discussing the same issue deploying an app, but it didn't help me solve the issue. Though that post doesn't directly discuss the NodeJS.

Unable to install dlib in anaconda

I am trying to install dlib in Anaconda so as to use it inside jupyter-notebook.
I tried using conda install -c menpo dlib and then dlib doesn't get installed rather it then says :
Downloading and Extracting Packages
py-boost-1.67.0 | 318 KB | ################################################################# | 100%
widgetsnbextension-1 | 1.1 MB | | 0%
ipywidgets-5.1.5 | 61 KB | | 0%
boost-1.59.0 | 11.9 MB | | 0%
dlib-19.9 | 2.3 MB | | 0%
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/widgetsnbextension-1.2.3-py35_1.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/ipywidgets-5.1.5-py35_0.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/boost-1.59.0-py35_0.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/dlib-19.9-py35_0.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
Then, I downloaded the dlib-19.16.0.tar.gz from here and saved it in /anaconda3/lib/python3.6/site-packages and then ran conda install -c conda-forge dlib-19.16.0.tar.gz but it shows :
PackagesNotFoundError: The following packages are not available from current channels:
- dlib-19.16.0.tar.gz
Current channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/osx-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/pro/osx-64
- https://repo.anaconda.com/pkgs/pro/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
The first error is just saying you are not able to connect to the menpo repository of libraries. I recommend to check your proxy/internet connection.
In the second case you are trying to install a tar.gz file, that's a compressed file. Decompressed it(unzip it) first and then try to install it.

Bluemix push error

i'm getting an error when I try to push to BlueMix from local.
> node lib/install.js
> optipng-bin#3.1.4 postinstall /tmp/app/node_modules/img-loader/node_modules/imagemin-optipng/node_modules/optipng-bin
✔ optipng pre-build test passed successfully
> pngquant-bin#3.1.1 postinstall /tmp/app/node_modules/img-loader/node_modules/imagemin-pngquant/node_modules/pngquant-bin
> node lib/install.js
✔ pngquant pre-build test passed successfully
> gifsicle#3.0.4 postinstall /tmp/app/node_modules/img-loader/node_modules/imagemin-gifsicle/node_modules/gifsicle
> node lib/install.js
✔ gifsicle pre-build test passed successfully
/tmp/buildpacks/cbed2b9b0603a1febfaafeebb556dd0b/lib/dependencies.sh: line 1: 163 Killed npm install --unsafe-perm --userconfig $build_dir/.npmrc 2>&1
-----> Build failed
Failed to compile droplet
Check our support community to get help on common issues:
http://ibm.biz/bluemixcommunitysupport
If you need additional help and your subscription includes support, submit a ticket so we can help:
http://ibm.biz/bluemixsupport
Exit status 223
Staging failed: Exited with status 223 (out of memory)
Destroying container
Successfully destroyed container
FAILED
Error restarting application: StagingError
It works great locally. I tried increasing memory to 1GB, didn't help either. Please help.

On Windows, wepback build is blocked during 'emit' phase

I created a simple webpack project for a Typescript library : https://github.com/lbar/test-webpackts-issue
On linux, npm run build finishes successfully:
> rimraf dist && webpack --progress --profile
10% 0/1 build modulests-loader: Using typescript#1.8.10 and /tmp/testwebpack/tsconfig.json 8030ms1217ms optimi5ms emit
Hash: 8eac1502f3b7a9a19be2
Version: webpack 1.13.1
Time: 2596ms
Asset Size Chunks Chunk Names
index.js 816 bytes 0 [emitted] index
index.js.map 6.07 kB 0 [emitted] index
/tmp/testwebpack/dist/index.d.ts 31 bytes [emitted]
/tmp/testwebpack/dist/src/info.d.ts 49 bytes [emitted]
+ 2 hidden modules
On Windows, npm run build is blocked during 'emit' phase. The output is :
> rimraf dist && webpack --progress --profile
10% 0/1 build modulests-loader: Using typescript#1.8.10 and C:\tmp\testwebpack\tsconfig.jso
1836ms build modules
3ms seal
7ms optimize
3ms hashing
7ms create chunk assets
79ms additional chunk assets
19ms optimize chunk assets
837ms optimize assets
95% emit
The version of node differs: 6.2.2 on Windows and 4.4.5 on Linux. I don't know if it may be the cause.
Has anyone an idea about the problem? Issue in webpack, ts-loader or typescript?
One more thing, call to tsc is working on both systems.
Thanks for your help
This problem is caused by an issue in ts-loader: https://github.com/TypeStrong/ts-loader/issues/185
A Pull Request is waiting fixes for project core team.
Webpack can use "awesome-typescript-loader" to avoid this issue.

Deploy Meteor App To AMAZON EC2 using MUP Error

I'm trying to use METEOR UP MUP to deploy my Meteor App to AWS AMAZON EC2.
I use different NPM Modules as well as METEOR PACKAGES in my Meteor App. It all works perfectly on my computer.
When I do a mup deploy I get the following errors:
[52.89.165.48] - Uploading bundle
[52.89.165.48] - Uploading bundle: SUCCESS
[52.89.165.48] - Setting up Environment Variables
[52.89.165.48] - Setting up Environment Variables: SUCCESS
[52.89.165.48] - Invoking deployment process
[52.89.165.48] x Invoking deployment process: FAILED
-----------------------------------STDERR-----------------------------------
sseph.h:4:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning (disable : 4251)
^
In file included from ../src/house.cc:1:0:
../src/swisseph.h:4:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning (disable : 4251)
^
In file included from ../src/eclipse.cc:1:0:
../src/swisseph.h:4:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning (disable : 4251)
^
gyp info ok
npm WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
stop: Unknown instance:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 80: Connection refused
App did not pick up! Please check app logs.
-----------------------------------STDOUT-----------------------------------
> node ./build.js
`linux-x64-v8-3.14` exists; testing
Binary is fine; exiting
ansi-regex#0.2.1 node_modules/ansi-regex
ansi-styles#1.1.0 node_modules/ansi-styles
escape-string-regexp#1.0.3 node_modules/escape-string-regexp
chalk#0.5.1 node_modules/chalk
strip-ansi#0.3.0 node_modules/strip-ansi
supports-color#0.2.0 node_modules/supports-color
has-ansi#0.1.0 node_modules/has-ansi
eachline#2.3.3 node_modules/eachline
type-of#2.0.1 node_modules/type-of
amdefine#1.0.0 node_modules/amdefine
asap#2.0.3 node_modules/asap
meteor-promise#0.4.8 node_modules/meteor-promise
underscore#1.5.2 node_modules/underscore
promise#7.0.4 node_modules/promise
source-map-support#0.3.2 node_modules/source-map-support
semver#4.1.0 node_modules/semver
source-map#0.1.32 node_modules/source-map
fibers#1.0.5 node_modules/fibers
Waiting for MongoDB to initialize. (5 minutes)
connected
AppName start/running, process 12612
Waiting for 15 seconds while app is booting up
Checking is app booted or not?
----------------------------------------------------------------------------
What's causing this?
How do I solve this?
Thank you....it's my first time using AWS EC2...
Make sure your mup.json nodeVersion is up to date with the Node version (0.10.40) required by the latest Meteor version (1.2).
"nodeVersion": "0.10.40",

Resources