serverless-operations / serverless-step-functions

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

Deploy fails just after adding the plugin #439

Closed v1nc3n4 closed 3 years ago

v1nc3n4 commented 3 years ago

This is a Bug Report

Description

For bug reports:

frameworkVersion: 2.46.0 unresolvedVariablesNotificationMode: error variablesResolutionMode: 20210326

provider: name: aws runtime: nodejs14.x stage: local profile: local region: us-east-1 lambdaHashingVersion: 20201221 memorySize: 128

plugins:

custom: bundle: linting: false localstack: stages:

package: individually: true

functions: myFunction: handler: src/features/my-function.handle events:

app-serverless@1.0.0 deploy:local D:\app-serverless rimraf .serverless && npm run sls deploy -- --stage local --region us-east-1

app-serverless@1.0.0 sls serverless "deploy" "--stage" "local" "--region" "us-east-1"

Serverless: Load command interactiveCli Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command config:tabcompletion Serverless: Load command config:tabcompletion:install Serverless: Load command config:tabcompletion:uninstall Serverless: Load command create Serverless: Load command install Serverless: Load command package Serverless: Load command deploy Serverless: Load command deploy:function Serverless: Load command deploy:list Serverless: Load command deploy:list:functions Serverless: Load command invoke Serverless: Load command invoke:local Serverless: Load command info Serverless: Load command logs Serverless: Load command metrics Serverless: Load command print Serverless: Load command remove Serverless: Load command rollback Serverless: Load command rollback:function Serverless: Load command slstats Serverless: Load command plugin Serverless: Load command plugin Serverless: Load command plugin:install Serverless: Load command plugin Serverless: Load command plugin:uninstall Serverless: Load command plugin Serverless: Load command plugin:list Serverless: Load command plugin Serverless: Load command plugin:search Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command upgrade Serverless: Load command uninstall Serverless: Load command offline Serverless: Load command offline:start Serverless: Load command webpack Serverless: config.options_stage: local Serverless: serverless.service.custom.stage: undefined Serverless: serverless.service.provider.stage: local Serverless: config.stage: local Serverless: Using serverless-localstack Serverless: Reconfiguring service acm to use http://localhost:4566 Serverless: Reconfiguring service amplify to use http://localhost:4566 Serverless: Reconfiguring service apigateway to use http://localhost:4566 Serverless: Reconfiguring service apigatewayv2 to use http://localhost:4566 Serverless: Reconfiguring service application-autoscaling to use http://localhost:4566 Serverless: Reconfiguring service appsync to use http://localhost:4566 Serverless: Reconfiguring service athena to use http://localhost:4566 Serverless: Reconfiguring service autoscaling to use http://localhost:4566 Serverless: Reconfiguring service batch to use http://localhost:4566 Serverless: Reconfiguring service cloudformation to use http://localhost:4566 Serverless: Reconfiguring service cloudfront to use http://localhost:4566 Serverless: Reconfiguring service cloudsearch to use http://localhost:4566 Serverless: Reconfiguring service cloudtrail to use http://localhost:4566 Serverless: Reconfiguring service cloudwatch to use http://localhost:4566 Serverless: Reconfiguring service cloudwatchlogs to use http://localhost:4566 Serverless: Reconfiguring service codecommit to use http://localhost:4566 Serverless: Reconfiguring service cognito-idp to use http://localhost:4566 Serverless: Reconfiguring service cognito-identity to use http://localhost:4566 Serverless: Reconfiguring service docdb to use http://localhost:4566 Serverless: Reconfiguring service dynamodb to use http://localhost:4566 Serverless: Reconfiguring service dynamodbstreams to use http://localhost:4566 Serverless: Reconfiguring service ec2 to use http://localhost:4566 Serverless: Reconfiguring service ecr to use http://localhost:4566 Serverless: Reconfiguring service ecs to use http://localhost:4566 Serverless: Reconfiguring service eks to use http://localhost:4566 Serverless: Reconfiguring service elasticache to use http://localhost:4566 Serverless: Reconfiguring service elasticbeanstalk to use http://localhost:4566 Serverless: Reconfiguring service elb to use http://localhost:4566 Serverless: Reconfiguring service elbv2 to use http://localhost:4566 Serverless: Reconfiguring service emr to use http://localhost:4566 Serverless: Reconfiguring service es to use http://localhost:4566 Serverless: Reconfiguring service events to use http://localhost:4566 Serverless: Reconfiguring service firehose to use http://localhost:4566 Serverless: Reconfiguring service glacier to use http://localhost:4566 Serverless: Reconfiguring service glue to use http://localhost:4566 Serverless: Reconfiguring service iam to use http://localhost:4566 Serverless: Reconfiguring service iot to use http://localhost:4566 Serverless: Reconfiguring service iotanalytics to use http://localhost:4566 Serverless: Reconfiguring service iotevents to use http://localhost:4566 Serverless: Reconfiguring service iot-data to use http://localhost:4566 Serverless: Reconfiguring service iot-jobs-data to use http://localhost:4566 Serverless: Reconfiguring service kafka to use http://localhost:4566 Serverless: Reconfiguring service kinesis to use http://localhost:4566 Serverless: Reconfiguring service kinesisanalytics to use http://localhost:4566 Serverless: Reconfiguring service kms to use http://localhost:4566 Serverless: Reconfiguring service lambda to use http://localhost:4566 Serverless: Reconfiguring service logs to use http://localhost:4566 Serverless: Reconfiguring service mediastore to use http://localhost:4566 Serverless: Reconfiguring service neptune to use http://localhost:4566 Serverless: Reconfiguring service organizations to use http://localhost:4566 Serverless: Reconfiguring service qldb to use http://localhost:4566 Serverless: Reconfiguring service rds to use http://localhost:4566 Serverless: Reconfiguring service redshift to use http://localhost:4566 Serverless: Reconfiguring service route53 to use http://localhost:4566 Serverless: Reconfiguring service s3 to use http://localhost:4566 Serverless: Reconfiguring service s3control to use http://localhost:4566 Serverless: Reconfiguring service sagemaker to use http://localhost:4566 Serverless: Reconfiguring service sagemaker-runtime to use http://localhost:4566 Serverless: Reconfiguring service secretsmanager to use http://localhost:4566 Serverless: Reconfiguring service ses to use http://localhost:4566 Serverless: Reconfiguring service sns to use http://localhost:4566 Serverless: Reconfiguring service sqs to use http://localhost:4566 Serverless: Reconfiguring service ssm to use http://localhost:4566 Serverless: Reconfiguring service stepfunctions to use http://localhost:4566 Serverless: Reconfiguring service sts to use http://localhost:4566 Serverless: Reconfiguring service timestream to use http://localhost:4566 Serverless: Reconfiguring service transfer to use http://localhost:4566 Serverless: Reconfiguring service xray to use http://localhost:4566 Serverless: Load command create Serverless: Load command create:test Serverless: Load command create:function Serverless: Load command invoke Serverless: Load command invoke:test Serverless: Load command invoke Serverless: Load command invoke:stepf Serverless: Load command login Serverless: Load command logout Serverless: Load command generate-event Serverless: Load command test Serverless: Load command dashboard Serverless: Load command output Serverless: Load command output:get Serverless: Load command output:list Serverless: Load command param Serverless: Load command param:get Serverless: Load command param:list Serverless: Load command studio Serverless: Deprecation warning: CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! app-serverless@1.0.0 deploy:local: rimraf .serverless && npm run sls deploy -- --stage local --region us-east-1 npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the app-serverless@1.0.0 deploy:local script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\\AppData\Roaming\npm-cache_logs\2021-06-25T11_15_25_980Z-debug.log


## Additional Data
* ***Serverless Framework Core Version you're using***: 2.46.0
* ***The Plugin Version you're using***: 2.30.0
* ***Operating System***: Win10 64 bits Pro
* ***Localstack***: 0.12.11
* ***Serverless Localstack***: 0.4.32

When the `serverless-step-functions` plugin is disabled - by commenting the line, deploy runs smoothly. What am I doing wrong just with a so simple modification?
Thanks in advance for your help!
BR
v1nc3n4 commented 3 years ago

Additional note: if I remove the ${sls:stage} variable usage, the error now is:

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

  TypeError: Cannot read property 'replace' of undefined
      at ServerlessStepFunctions.newDisplay [as display] (D:\app-serverless\node_modules\serverless-localstack\src\index.js:661:47)
      at ServerlessStepFunctions.tryCatcher (D:\app-serverless\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (D:\app-serverless\node_modules\bluebird\js\release\promise.js:547:31)
      at Promise._settlePromise (D:\app-serverless\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromise0 (D:\app-serverless\node_modules\bluebird\js\release\promise.js:649:10)
      at Promise._settlePromises (D:\app-serverless\node_modules\bluebird\js\release\promise.js:729:18)
      at _drainQueueStep (D:\app-serverless\node_modules\bluebird\js\release\async.js:93:12)
      at _drainQueue (D:\app-serverless\node_modules\bluebird\js\release\async.js:86:9)
      at Async._drainQueues (D:\app-serverless\node_modules\bluebird\js\release\async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (D:\app-serverless\node_modules\bluebird\js\release\async.js:15:14)
      at processImmediate (internal/timers.js:461:21)

If I remove the step functions plugin, deploy runs normally.

May be related to: https://github.com/localstack/serverless-localstack/issues/149

v1nc3n4 commented 3 years ago

Also probably already mentioned in #409

Pigius commented 3 years ago

The same as well.

medikoo commented 3 years ago

This will be fixed with https://github.com/serverless-operations/serverless-step-functions/pull/451

horike37 commented 3 years ago

:tada: This issue has been resolved in version 3.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: