It feels a bit silly writing articles about handling very specific bugs, but a similar article I wrote previously is consistently one of my most-viewed articles and appears high in Google search results. So, assuming that's because it's useful, I'll do so again.
Yesterday I wrote a WebdriverIO test in the Cucumber handler. When I ran it this morning, I got the following error:
<--- Last few GCs ---> 96024 ms: Mark-sweep 1197.8 (1437.0) -> 1197.8 (1437.0) MB, 1806.3 / 0 ms [allocation failure] [GC in old space requested]. 97817 ms: Mark-sweep 1197.8 (1437.0) -> 1197.8 (1437.0) MB, 1793.4 / 0 ms [allocation failure] [GC in old space requested]. 99611 ms: Mark-sweep 1197.8 (1437.0) -> 1197.7 (1437.0) MB, 1794.2 / 0 ms [last resort gc]. 101388 ms: Mark-sweep 1197.7 (1437.0) -> 1197.7 (1437.0) MB, 1776.7 / 0 ms [last resort gc]. <--- JS stacktrace ---> ==== JS stack trace ========================================= Security context: 00000329E79C9E79
The error message and some cursory Google searching pointed towards a memory problem, so I started looking at increasing the memory limit. However, this turned out to be a waste of time since the problem was quite simple:
Selenium Grid wasn't running on my server. I started it up and everything worked fine.
Bugs like this are frustrating because, if the error message had been "can't connect to Selenium Grid server", it wouldn't have taken any of my time to resolve. Hopefully though, now that I've documented it, other people can find this on Google and not waste their time trying to fiddle with memory allocations.