sls-dev-tools: UnhandledPromiseRejectionWarning when run command

Describe the bug When run sls-dev-tools command (inside serverless project) I get following error, and it keep occurring.

(node:25641) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 16)
(node:25641) UnhandledPromiseRejectionWarning: ValidationError: Stack with id undefined-dev does not exist
    at Request.extractError (/usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/protocol/query.js:50:29)
    at Request.callListeners (/usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/request.js:683:14)            .
    at Request.transition (/usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/usr/local/lib/node_modules/sls-dev-tools/node_modules/aws-sdk/lib/sequential_executor.js:116:18)

To Reproduce Steps to reproduce the behavior:

  1. Goto serverless project folder in iTerm/Terminal
  2. issue command sls-dev-tools

If relevant

  • OS: macOS
  • Version Latest
  • Deployment Framework: serverless

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 29 (16 by maintainers)

Most upvoted comments

@zhhz @psrivastava-rsc Thanks for letting us know. Currently investigating this issue while making improvements to the tool’s error handling

Hi @DotGav Yeah I have tried running this command sls-dev-tools -r us-east-1 -s develop as mentioned earlier. This is not helping. As you mentioned opt problem, I am now using more simplified serverless.yml file as mentioned below:

  stage: 'develop'
  region: 'us-east-1'

@psrivastava-rsc No worries! Hopefully should be able to find a fix for this tomorrow, additionally, we do have a helper wizard for stack name when one isn’t provided (or is undefined as above) in progress which can hopefully get released tomorrow as a priority which should also fix this issue.

@psrivastava-rsc to help the team looking into this tomorrow would you mind sharing your serverless.yml (redacted as needed). Especially the service and provider sections.