We run our protractor tests in Chrome instance via xvfb server. Last week after Chrome update to 60.0.3112.90, it began to fail with the following error. + xvfb-run -d ‘–server-args=-screen 0 1280x1024x24’ protractor protractor.config.js [00:07:03] I/launcher – Running 1 instances of WebDriver [00:07:03] I/direct – Using ChromeDriver directly… [00:07:03] E/launcher – Server terminated early with […]
Building a Simple Stopwatch App with Electron
Few days ago I decided to find a Stopwatch app for my Mac. I went over to the App Store and noticed that there were no good free options available. I thought to myself, how hard would it be to make one with Electron? Turns out, it was very easy. Getting an Electron shell running […]
Compile Node.js to Native Binaries
Guillermo Rauch (Socket.io, Mangoose.js, Hyper.js, Now) is the guy to watch, and last night he did not disappoint. The following tweet announced pkg – a simple tool to generate a native executable file from Node.js code targeting Mac, Linux, and Windows. Introducing `pkg` Single command binary compilation for Node.js pic.twitter.com/Dbe9L1gb0x — ZEIT (@zeithq) April 29, […]
Understanding differences between npm, yarn and pnpm
Introduction I am not an expert on either of the package managers. Contrary, until few days ago I didn’t realize that npm used a local cache. Unaware, I wrote an article titled OMG — NPM clone that finally makes sense and was called out on some of my false assumptions. That feedback forced me to take a […]
OMG – NPM clone that finally makes sense
Note: Everything I’ve assumed was wrong, I am keeping track of things as I discover them via the medium post: https://medium.com/@akras14/omg-npm-clone-that-finally-makes-sense-3478588879 I’ll update this post when the dust settles 🙂 Last week I came across a yet another NPM clone, called pnpm, but unlike other clones (cough Yarn) this one is actually interesting! What so […]
TypeError – The Header Content Contains Invalid Characters
A few weeks ago our production code started to throw a weird error, that looked like this: _http_outgoing.js:351 throw new TypeError(‘The header content contains invalid characters’); ^ TypeError: The header content contains invalid characters at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:351:13) This was very strange, since it was coming from a code that used to work for a long […]
Simple Guide to Finding a JavaScript Memory Leak in Node.js
Table of Contents Introduction Minimal Theory Step 1. Reproduce and confirm the problem Step 2. Take at least 3 Heap dumps Step 3. Find the problem Step 4. Confirm that the issue is resolved Links to some other resources Summary Something you might want to bookmark: Simple Guide to Finding a JavaScript Memory Leak in […]
Simple HTTPS Test Server Using Node.js
I needed a simple server to test my HTTPS POST requests. Just like a regular HTTP server, it is super easy to do in Node. Except I needed to add private key and a cert, which is an extra step and was not immediately obvious to me, so I figure I’d share my findings. Step […]
How to Allow Node.Js App to Bind to Port 80 on Mac – For Testing Purposes Only
Run it as sudo i.e. sudo node server.js I just spent over 10 minutes looking around the internet for this simple solution. Hopefully, this post will save somebody some time 🙂