Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

fix #15 issue ('Cannot read property 'hasOwnProperty' of null') #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kkarczmarczyk
Copy link

Resolves issue #15 :

Serverless:
Serverless: Converting local crontabs to UTC crontabs...
Serverless: [object Object]

  Type Error ---------------------------------------------

  TypeError: Cannot read property 'hasOwnProperty' of null
      at ServerlessLocalCrontabs.convertCrontabs (/Users/kkarczmarczyk/repo/harvey-serverless/node_modules/serverless-local-schedule/index.js:71:24)
      at /Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/lib/classes/PluginManager.js:510:55
      at tryCatcher (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
      at Object.gotValue (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/reduce.js:168:18)
      at Object.gotAccum (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/reduce.js:155:25)
      at Object.tryCatcher (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromise0 (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:729:18)
      at _drainQueueStep (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:93:12)
      at _drainQueue (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/Users/kkarczmarczyk/.nvm/versions/node/v14.12.0/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:461:21)

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              14.12.0
     Framework Version:         2.8.0
     Plugin Version:            4.1.1
     SDK Version:               2.3.2
     Components Version:        3.2.7

eventIndex
];
// only process events with a schedule & a timezone
if (
event.hasOwnProperty("schedule") &&
event.schedule.hasOwnProperty("timezone")
schedule.hasOwnProperty("rate") &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@KillDozerX2 KillDozerX2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed anymore

@mashkovtsevlx
Copy link

@KillDozerX2 It's still the case. It doesn't work for me as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants