Skip to content

Instantly share code, notes, and snippets.

View aslushnikov's full-sized avatar
🚀
Going through all the e-mails and notifications

Andrey Lushnikov aslushnikov

🚀
Going through all the e-mails and notifications
View GitHub Profile
> [email protected] ftest /Users/aslushnikov/prog/playwright
> cross-env BROWSER=firefox jest "page-wait-for-navigation.spec.js"
console.error
Using executable at /Users/aslushnikov/firefox/obj-build-playwright/dist/Nightly.app/Contents/MacOS/firefox
73 | executablePath = process.env.WKPATH;
74 | if (executablePath)
> 75 | console.error(`Using executable at ${executablePath}`);
@aslushnikov
aslushnikov / Dockerfile.firefox
Created July 30, 2020 21:38
Docker file to build Firefox for playwright
FROM ubuntu:18.04 as firefox-builder
RUN apt-get update && apt-get install -y wget \
git-core \
python \
python3 \
python3-distutils \
curl \
clang-9

Setting up new Ubuntu 20.04 buildbot on Azure

Recording of my steps to setup Ubuntu 20.04 buildbot VM on July 22, 2020. The bot is responsible for WebKit builds.

  1. Update apt-get & install clang-9 to be consistent with Ubuntu 18.04 bot.
~$ sudo apt-get update
~$ sudo apt-get install clang-9

Setting up new Ubuntu 18.04 buildbot on Azure

Recording of my steps to setup Ubuntu 18.04 buildbot VM on July 22, 2020. The bot is responsible for WebKit and Firefox builds.

  1. Install clang-9. Default clang-6 is too old to compile Firefox - we need a new one.
~$ sudo apt-get install clang-9
~$ sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 100

Before

pwuser@396166c88ec2:/root/playwright$ node a.js
(node:9916) UnhandledPromiseRejectionWarning: browserType.launch: Protocol error (Target.setAutoAttach): Target closed.
=========================== logs ===========================
[browser] <launching> /home/pwuser/.cache/ms-playwright/chromium-786218/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disab
le-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies --disable-hang-monitor --disab

What is this for

This script lists the package names for the missing libraries in a given debian distribution.

Usage

Using the script (e.g. with ubuntu 18.04)

  1. Put script in the current directory and name it deps.js
  2. Run docker with distro in question and mount current folder with the script into it
FROM ubuntu:bionic
RUN apt-get update && apt-get install -y curl && \
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
apt-get install -y nodejs
RUN apt-get update && apt-get install -y libwoff1 \
libopus0 \
libwebp6 \
libwebpdemux2 \
#!/usr/bin/env node
const fs = require('fs');
const util = require('util');
const path = require('path');
const {spawn} = require('child_process');
const accessAsync = util.promisify(fs.access.bind(fs));
const checkExecutable = (filePath) => accessAsync(filePath, fs.constants.X_OK).then(() => true).catch(e => false);
const statAsync = util.promisify(fs.stat.bind(fs));

As we were preparing Playwright 1.1.0, I learned quite a lot about Web Proxies. Below is the summary of my findings.

TIL: WEB Proxies

Reverse Web Proxy vs Forwarding Web Proxy

There are two groups of proxies that drive internet: