newsuk / AyeSpy

A performant visual regression testing tool
BSD 3-Clause "New" or "Revised" License
206 stars 13 forks source link

TypeError: this._onError is not a function #217

Open rahulvramesh opened 2 years ago

rahulvramesh commented 2 years ago

while i try to run with following command

ayespy snap --browser chrome --config ./ayespy-config.json --run "Home"

getting

info ayespy Logger Log level is info
info [configValidator] : Config validated ✅
info [run] : Getting snapshots... 📸

   Progress [-----------------------------------------------------------------] 0% | ETA: 0s | Snapped 0/1/Users/rahulvr4
      this._onError();
           ^

TypeError: this._onError is not a function
    at SnapShotter.takeSnap (/Users/name/.nvm/versions/node/v16.15.0/lib/node_modules/aye-spy/lib/snapshotter.js)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 0)
    at async /Users/name/.nvm/versions/node/v16.15.0/lib/node_modules/aye-spy/lib/getScreenshots.js:88:7
brunopc-net commented 11 months ago

@rahulvramesh were you able to resolve this? I'm having the same problem, 1st time with ayespy

rahulvramesh commented 11 months ago

@rahulvramesh were you able to resolve this? I'm having the same problem, 1st time with ayespy

Unfortunately no. Seems repo is not maintained as well.

brunopc-net commented 11 months ago

@rahulvramesh bummer. Thank you for your fast reply

mattford commented 5 months ago

Looks like it was introduced in this commit https://github.com/newsuk/AyeSpy/commit/34392dc1e995a0a076b7d866dd999b39fed5c549

The constructor signature for SnapShotter changes to include a new onInfo parameter, however the initialisation of the SnapShotter isn't updated, so it uses the onError callback value for _onInfo and _onError ends up undefined.