garris / garris/BackstopJS

Docker fails with Cannot set property 'tempCompareConfigFileName' of undefined

Open
#849 19 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

My backstop.config.json:

```js
{
"id": "core",
"viewports": [
{
"label": "phone",
"width": 414,
"height": 736
},
{
"label": "desktop",
"width": 1366,
"height": 768
}
],
"onReadyScript": "onReady.js",
"scenarios": [
{
"label": "Tests",
"url": /* my url */,
"delay": 0,
"selectors": [
/* a bunch of selectors */
],
"selectorExpansion": true,
"misMatchThreshold": 0,
"requireSameDimensions": true,
"readySelector": "#root"
}
],
"paths": {
"bitmaps_reference": "./backstop/reference",
"bitmaps_test": "./backstop/test",
"engine_scripts": "./backstop/scripts",
"html_report": "./reports/backstop",
"ci_report": "./reports"
},
"fileNameTemplate": "{selectorLabel}-{viewportLabel}",
"report": [
"browser",
"CI"
],
"ci": {
"testReportFileName": "backstop.xunit.xml"
},
"engine": "chromy",
"engineOptions": {
"waitTimeout": 1000,
"chromeFlags": [
"--force-device-scale-factor=1"
]
},
"asyncCaptureLimit": 1,
"asyncCompareLimit": 10,
"debug": false,
"debugWindow": true,
"resembleOutputOptions": {
"ignoreAntialiasing": true
}
}
```

Console output:

```
$ backstop test --docker --config=backstop.config.json
BackstopJS v3.5.10
Loading config: /Users/[path]/backstop.config.json

COMMAND | Executing core for "test"
Delegating command to Docker... docker run --rm -it --mount type=bind,source="/Users/[path]",target=/src backstopjs/backstopjs test "--_=test" "--h=false" "--help=false" "--v=false" "--version=false" "--i=false" "--moby=true" "--config=backstop.config.json" "--moby" "--config=backstop.config.json"
BackstopJS v3.5.10
User config detected.
COMMAND | Executing core for "test"
/usr/local/lib/node_modules/backstopjs/core/util/createBitmaps.js:53
configJSON.paths.tempCompareConfigFileName = config.tempCompareConfigFileName;
^

TypeError: Cannot set property 'tempCompareConfigFileName' of undefined
at decorateConfigForCapture (/usr/local/lib/node_modules/backstopjs/core/util/createBitmaps.js:53:46)
at writeReferenceCreateConfig (/usr/local/lib/node_modules/backstopjs/core/util/createBitmaps.js:81:68)
at module.exports (/usr/local/lib/node_modules/backstopjs/core/util/createBitmaps.js:213:10)
at Object.execute (/usr/local/lib/node_modules/backstopjs/core/command/test.js:13:14)
at Object.execute [as test] (/usr/local/lib/node_modules/backstopjs/core/command/index.js:52:49)
at execute (/usr/local/lib/node_modules/backstopjs/core/command/index.js:102:31)
at module.exports (/usr/local/lib/node_modules/backstopjs/core/runner.js:6:10)
at Object. (/usr/local/lib/node_modules/backstopjs/cli/index.js:45:3)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
```

Backstop installed globally, v3.5.10, docker image v3.5.10, on OSX. This config works as expected when I run it without `--docker`. Could you please help me debug this?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.