serverless-plugin-simulate
serverless-plugin-simulate copied to clipboard
Simulate exits shortly after initialization without processing requests
I suspect there's a good chance this repo is abandoned, but maybe others hit this and need a fix too...
This is a Bug Report
Description
We've been running this for a bit, but after unclear/unspecified changes (to the development laptop, node versions, serverless version, anything's possible), started seeing sis simulate lambda exiting without error. Digging in with a debugger didn't make the issue clear either - it seemed to just exit, like it didn't have any reason to keep running. Indeed, it looked like all of serverless' promises resolved.
While debugging, I did verify that it can listen() to a socket, and if you've got it stopped, the socket is open (visible with netstat or lsof). no obvious exceptions.
We're running the fork from signalvine/serverless-plugin-simulate@fix-89, since we're doing fat-JAR(ish) artifacts.
- What went wrong?
serverless simulate lambda exits after initialization without processing any requests.
- What did you expect should have happened?
Should keep running, and should process requests, if any come in.
- What was the config you used?
(note: portions skipped or lightly anonymized)
service: ourService
provider:
name: aws
runtime: python3.6
region: us-west-2
stage: ${opt:stage, 'laptop'}
package:
artifact: artifact.zip
functions:
ping:
handler: lambda_worker.ping
memorySize: 256
plugins:
- serverless-plugin-simulate
- What stacktrace or error message from your provider did you see?
None whatsoever. Complete output (without SLS_DEBUG is):
$ sls simulate lambda
Serverless: Starting registry with db at /Users/jdb/Projects/ourService/.sls-simulate-registry
Serverless: Starting registry at: http://<ip>:4000
Adding SLS_DEBUG=* adds the usual assortment of Serverless: Load command <stuff> messages, and the simulate Invoke simulate:lambda message. But no more.
Additional Data
- Serverless Framework Version you're using: 1.35.1, 1.36.3
- Serverless Docker Plugin Version you're using: Looks like
serverless-plugin-simulatespecifies^0.13.1in itspackage.json. We aren't doing different. - Operating System: macOS 10.14.2
- Stack Trace: None
- Provider Error messages: None
same issue here. any updates on this?
For me, after a lot of head scratching when one of my environments ran without issue whereas the same repo would constantly exit as soon as it started... it looks like the version of serverless has something to do with it.
npm install [email protected] --save-dev
Fixed it for me. Using a later version (I think 1.4x?) would cause serverless-plugin-simulate to exit. So must be some difference in how they handle promises in the newer serverless versions or something along those lines?
I get the same issue, tried to revert to serverless 1.32.0 but still exits as soon as it displays the invoke url.
Serverless: Invoke URL: http://localhost:4000