Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Not working with sns #36

Open
VladisB opened this issue Dec 25, 2019 · 3 comments
Open

Not working with sns #36

VladisB opened this issue Dec 25, 2019 · 3 comments

Comments

@VladisB
Copy link

VladisB commented Dec 25, 2019

When I used serverless-offline-scheduler I couldn't get a response from sns.publish().promise() it's just waiting and nothing did, but when I changed function event to http it worked normally. It's kinda strange, isn't it?

@ajmath
Copy link
Owner

ajmath commented Dec 26, 2019

Yeah that's weird. I'm not entirely sure of what you're trying to do though. This plugin shouldn't have any effect on sns.publish

@shierro
Copy link

shierro commented Jan 27, 2020

@ajmath seems like serverless-offline restarts when the scheduler triggers.
i'm on a windows 10 machine, and i'm using SNS offline

this is some of the stack trace

opts {
  endpoint: 'http://127.0.0.1:4001',
  region: 'ap-southeast-2',
  httpOptions: { connectTimeout: 15000, timeout: 5000 }
}
{"message":"error in publish function","level":"error"}
{"message":"{\"message\":\"Connection timed out after 5000ms\",\"code\":\"TimeoutError\",\"time\":\"2020-01-27T07:19:30.893Z\",\"region\":\"ap-southeast-2\",\"hostname\":\"127.0.0.1\",\"retryable\":true}","level":"error"}
"undefined"
Serverless: scheduler: Succesfully run scheduled job: taskDelegator

when I call the same publish function, w/o this scheduler, I get a success.

I think this plugin somehow restarts serverless-offline(based on the stack trace, webpack builds again), then the server started by serverless-offline-sns is prevented to restart.

Framework Core: 1.61.3
Plugin: 3.2.7
SDK: 2.3.0
Components Core: 1.1.2
Components CLI: 1.4.0

these are the plugins that i'm using

plugins:
  - serverless-webpack
  - serverless-iam-roles-per-function
  - serverless-dotenv-plugin
  - serverless-pseudo-parameters
  - serverless-domain-manager
  - serverless-prune-plugin
  - serverless-offline-sns
  - serverless-offline-scheduler
  - serverless-offline

@tomusiaka
Copy link

We are running into the same issue. I looks like it might be caused by #44.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants