question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hanging on sls deploy, with no output

See original GitHub issue

This is a (Bug Report / Feature Proposal)

Description

  • What went wrong? I referenced custom variables in a file two folders higher in the folder hierarchy, and used them to set a variable in serverless.yml. When doing sls deploy, nothing happens, it just ‘hangs’, with no output, and I have to kill it. Like an infinite loop or recursion.

  • What did you expect should have happened? To set the variables properly and deploy ? ^^

  • What was the config you used? ?

  • What stacktrace or error message from your provider did you see? None

It’s kinda funny ^^"

Additional Data

  • Serverless Framework Version you’re using: 1.16.1
  • Operating System: macOS 10.13 beta(17A291j)
  • Stack Trace: None
  • Provider Error messages: None

Faulty lines in serverless.yml (makes sls deploy hang indefinitely):

custom:
  private: ${file(../../slsconf/private.yml)}
  sns: ${file(../../slsconf/sns.yml)}

Replacing them with the following works just fine

custom:
  private: ${file(../../slsconf/private.yml)}
  sns:
    topicNames:
    sources:
      source:
        action: sources_source_action_${self:provider.stage}
  arns:
    sources:
      source:
        action: arn:aws:sns:${self:provider.region}:${self:custom.private.IDs.aws}:${self:custom.sns.topicNames.sources.source.action}

Content of private.yml

APIKeys:
  baseSync: anApiKey
IDs:
  aws: myAwsId
misc:
  baseUserAgent: anUser/Agent
  baseTestClientDeviceUUID: anUUID

Content of sns.yml

topicNames:
  sources:
    source:
      action: sources_source_action_${self:provider.stage}

arns:
  sources:
    source:
      action: arn:aws:sns:${self:provider.region}:${self:custom.private.IDs.aws}:${self:custom.sns.topicNames.sources.source.action}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
hassankhancommented, Jul 2, 2017

I had a similar issue which turned out to be cyclic references in YML.

@El-Fitz I think in your case it might be that sns.yml references itself under arns.sources.source.action: ${self:custom.sns.topicNames.sources.source.action}. If you change just this (somehow) and try re-deploying does it work?

0reactions
erikeriksoncommented, Aug 23, 2017

#4146 (a branch off of #4144) might be a better target to test with. It solves a serialization related issue I ran into.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serverless deploy doesn't work and no error to debug with
I have export SLS_DEBUG=* and no additional data is displayed. the deploy ends with assumeRole. I have a personal account (that doesn't ...
Read more >
Serverless hangs when running sls deploy. Docker command ...
Okay so turns out everything works. The command is not hanging, it just takes a lot of time. Patience is the key.
Read more >
serverless-offline/community - Gitter
I am encountering this issue when im deploying my lambda function on the AWS. ... npm WARN contra.serverless@1.0.0 No repository field.
Read more >
Top 10 Serverless Deployment Errors (and How to Fix Them)
You know what they say: successful deploys are all alike; every unsuccessful deploy is unsuccessful in its own way (ok, no one actually...
Read more >
How to deploy a Node.js application to AWS Lambda using ...
The walkthrough will also cover a real-life scenario of deploying a production version of your application, with environment variables, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found