rawnly/splash-cli

Cannot read property 'url' of undefined

TotomInc opened this issue · 1 comments

Basic informations

  • Splash CLI version: 3.4.0
  • Node version: 10.15.0
  • Your OS: Mac OS Mojave 10.14.4

Before you go

  • I've read the FAQ section.
  • I've the latest version of Splash CLI installed
  • I've searched other issues like mine but I haven't found a solution.

The ISSUE

When running splash --collection wallpapers, I got the error of url undefined. This is not the first time I have this error, it seems that sometimes the Splash API should not return an image url.

To Reproduce
Steps to reproduce the behavior:

  1. Run splash --collection wallpapers (please not it doesn't happen every time)

Expected behavior
splash-cli should retrieve the image url from Splash API's and setup the wallpaper.

Console Output

OOps! We got an error!

Please report it: on GitHub (https://github.com/splash-cli/splash-cli/issues)

Splash Error:

 TypeError: Cannot read property 'url' of undefined
    at _callee$ (/Users/totominc/.config/yarn/global/node_modules/splash-cli/build/client.js:361:19)
    at tryCatch (/Users/totominc/.config/yarn/global/node_modules/babel-runtime/node_modules/regenerator-runtime/ru
ntime.js:62:40)
    at Generator.invoke [as _invoke] (/Users/totominc/.config/yarn/global/node_modules/babel-runtime/node_modules/r
egenerator-runtime/runtime.js:296:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/totominc/.config/yarn/global/node_modules/babel-r
untime/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (/Users/totominc/.config/yarn/global/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /Users/totominc/.config/yarn/global/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
    at process._tickCallback (internal/process/next_tick.js:68:7)

I'll investigate, it's not easy at all fix this type of bugs, please have patience.