Search code examples
testingreact-nativejestjscirclecidetox

Are Circleci macOS boxes too low spec to run Detox?


I have created an issue for this on the detox repo here.

I have a React Native application which I test using Jest and Detox.

Locally the Detox tests run with no problems (sanity checked on other dev machines too). However, they have never passed when run in a macOS box on Circleci.

The debug output from Detox makes it look like Detox is forever busy after the initial app setup on the simulator but no progress is made past that point.

The relevant versions involved:

  • Detox: 7.3.3
  • React Native: 0.55.1
  • Node: 8.9.1
  • Device: iPhone 7 (11.2)
  • Xcode: 9.2.0
  • macOS: 10.12.6

A snippet of the detox logs once it hits the "hung" state:

    detox verb ws
    detox verb ws send: {"type":"reactNativeReload","params":{},"messageId":-1000}
    detox verb ws send: {"type":"currentStatus","params":{},"messageId":4}
    detox verb ws onMessage: {"type":"currentStatusResult","messageId":4,"params":{"state":"busy","resources":[{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x1112b9dc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x1112bb300], width = 0x1, state = 0x001ffe9e00000400, dirty, max qos 6, in-flight = 0, thread = 0x403 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":4}}
    detox verb ws
    detox info Sync Dispatch Queue: com.apple.main-thread
    detox verb ws send: {"type":"currentStatus","params":{},"messageId":5}
    detox verb ws onMessage: {"type":"currentStatusResult","messageId":5,"params":{"state":"busy","resources":[{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x1112b9dc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x1112bb300], width = 0x1, state = 0x001ffe9e00000400, dirty, max qos 6, in-flight = 0, thread = 0x403 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":5}}
    detox verb ws
    detox info Sync Dispatch Queue: com.apple.main-thread
    detox verb ws send: {"type":"currentStatus","params":{},"messageId":6}
    detox verb ws onMessage: {"type":"currentStatusResult","messageId":6,"params":{"state":"busy","resources":[{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x1112b9dc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x1112bb300], width = 0x1, state = 0x001ffe9e00000400, dirty, max qos 6, in-flight = 0, thread = 0x403 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":6}}
    detox verb ws
    detox info Sync Dispatch Queue: com.apple.main-thread
    detox verb ws send: {"type":"currentStatus","params":{},"messageId":7}
    detox verb ws onMessage: {"type":"currentStatusResult","messageId":7,"params":{"state":"busy","resources":[{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x1112b9dc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x1112bb300], width = 0x1, state = 0x001ffe9e00000400, dirty, max qos 6, in-flight = 0, thread = 0x403 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":7}}
    detox verb ws
    detox info Sync Dispatch Queue: com.apple.main-thread
    detox verb ws send: {"type":"currentStatus","params":{},"messageId":8}
    detox verb ws onMessage: {"type":"currentStatusResult","messageId":8,"params":{"state":"busy","resources":[{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x1112b9dc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x1112bb300], width = 0x1, state = 0x001ffe9e00000400, dirty, max qos 6, in-flight = 0, thread = 0x403 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":8}}
    detox verb ws
    detox info Sync Dispatch Queue: com.apple.main-thread
    detox verb ws send: {"type":"currentStatus","params":{},"messageId":9}
    detox verb ws onMessage: {"type":"currentStatusResult","messageId":9,"params":{"state":"busy","resources":[{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x1112b9dc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x1112bb300], width = 0x1, state = 0x001ffe9e00000400, dirty, max qos 6, in-flight = 0, thread = 0x403 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":9}}
    detox verb ws
    detox info Sync Dispatch Queue: com.apple.main-thread
    detox verb ws send: {"type":"currentStatus","params":{},"messageId":10}
    detox verb ws onMessage: {"type":"currentStatusResult","messageId":10,"params":{"state":"busy","resources":[{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x1112b9dc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x1112bb300], width = 0x1, state = 0x001ffe9e00000400, dirty, max qos 6, in-flight = 0, thread = 0x403 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":10}}
    detox verb ws
    detox info Sync Dispatch Queue: com.apple.main-thread
    detox verb ws send: {"type":"currentStatus","params":{},"messageId":11}
    detox verb ws onMessage: {"type":"currentStatusResult","messageId":11,"params":{"state":"busy","resources":[{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x1112b9dc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x1112bb300], width = 0x1, state = 0x001ffe9e00000400, dirty, max qos 6, in-flight = 0, thread = 0x403 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":11}}
    detox verb ws
    detox info Sync Dispatch Queue: com.apple.main-thread
    detox verb ws send: {"type":"currentStatus","params":{},"messageId":12}
    detox verb ws onMessage: {"type":"currentStatusResult","messageId":12,"params":{"state":"busy","resources":[{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x1112b9dc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x1112bb300], width = 0x1, state = 0x001ffe9e00000400, dirty, max qos 6, in-flight = 0, thread = 0x403 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":12}}

My question is; is Detox hanging because of the low resource (computationally) environment it is run in on Circleci (does anyone have a large Detox suite functioning on Circleci)?


Solution

  • Downgraded the Nodejs version to < 8.8 and all is now running as expected.