serverless-operations / serverless-step-functions

AWS Step Functions plugin for Serverless Framework ⚡️
Other
1.03k stars 204 forks source link

Receiving TypeError: Cannot read property 'stepFunctions' of undefined since 3.0.0 release #454

Open dsciacca opened 3 years ago

dsciacca commented 3 years ago

This is a Bug Report

Description

For bug reports:

Similar or dependent issues:

Additional Data

Famin42 commented 3 years ago

same issue

Famin42 commented 3 years ago

take a look what i find at serverless forum link

dsciacca commented 3 years ago

Thanks for the additional link @Fomin2402 to confirm I do have serverless-step-functions called out in the plugins section of my serverless.yaml file:

plugins:
  - serverless-step-functions
  - serverless-pseudo-parameters
antoniomartin-levatas commented 3 years ago

Same issue with v3.0.0. Only it works with v2.32.0

mark1044 commented 2 years ago

Same issue `Type Error ---------------------------------------------

TypeError: Cannot read property 'stepFunctions' of undefined at ServerlessStepFunctions.yamlParse (/home/Desktop/serverless-backend/node_modules/serverless-step-functions/lib/yamlParser.js:10:30) at ServerlessStepFunctions.tryCatcher (/home/Desktop/serverless-backend/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/Desktop/serverless-backend/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/home/Desktop/serverless-backend/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromiseCtx (/home/Desktop/serverless-backend/node_modules/bluebird/js/release/promise.js:641:10) at _drainQueueStep (/home/Desktop/serverless-backend/node_modules/bluebird/js/release/async.js:97:12) at _drainQueue (/home/Desktop/serverless-backend/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/home/Desktop/serverless-backend/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/home/Desktop/serverless-backend/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:464: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: linux Node Version: 14.17.6 Framework Version: 2.0.0 Plugin Version: 4.0.2 SDK Version: 2.3.2 Components Version: 3.1.2`

Onosume commented 2 years ago

Getting the same issue on 3.1.0. I've used 2.21.1 on previous APIs fine, but integrating step functions into a different API using the latest version doesn't seem to work.

TypeError: Cannot read property 'stepFunctions' of undefined at ServerlessStepFunctions.yamlParse (node_modules\serverless-step-functions\lib\yamlParser.js:10:30) at ServerlessStepFunctions.tryCatcher (node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromiseCtx (node_modules\bluebird\js\release\promise.js:641:10) at _drainQueueStep (node_modules\bluebird\js\release\async.js:97:12) at _drainQueue (node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [node_modules\bluebird\js\release\async.js:15:14) at processImmediate (internal/timers.js:439:21) at process.topLevelDomainCallback (domain.js:130:23)

Your Environment Information --------------------------- Operating System: win32 Node Version: 12.13.1 Framework Version: 1.62.0 SDK Version: 2.3.0 Components Core Version: 1.1.2 Components CLI Version: 1.4.0

alsenydiallo commented 2 years ago

Any resolution to this issue ?

sezhava commented 2 years ago

I faced the same issue. I was running an incompatible plugin version with my serverless framework. I fixed it by downgrading the stepfunctions plugin version to "^1.20.0" "serverless-step-functions": "^1.20.0"

rudyhadoux commented 1 year ago

Hi,

Someone manages to trigger a step functions workflow from a lambda ? I do not.

{
    "errorType": "TypeError",
    "errorMessage": "Cannot read properties of undefined (reading 'StepFunctions')",
    "stack": [
        "TypeError: Cannot read properties of undefined (reading 'StepFunctions')",
        "    at /var/task/handler.js:47:55",
        "    at step (/var/task/handler.js:33:23)",
        "    at Object.next (/var/task/handler.js:14:53)",
        "    at /var/task/handler.js:8:71",
        "    at new Promise (<anonymous>)",
        "    at __awaiter (/var/task/handler.js:4:12)",
        "    at Runtime.essaiworkflow [as handler] (/var/task/handler.js:41:47)",
        "    at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1083:29)"
    ]
}