-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke local keeps hanging after response #6679
Comments
I'm having the same issue with version |
It looks like this might have been introduced in the |
Actually, in my case the problem is that I've got a MongoDB connection that should be kept open between executions. However, even when using |
Ah I see, for me there has been no code change, it "broke" on updating the version so I stepped back to find out when the behaviour appears to have changed... |
Interesting! For me this is a new service that I was creating so I wasn't really sure if the issue originated from my code or serverless'. Anyways, let's see if we can get the attention of any maintainer 😄 |
On 1.53.0 and having the same issue... |
Yes, I got the same issue :) - Please fix this. |
Having the same issue on 1.54.0. |
Still hanging on 1.55.1, although it seems to not "freeze" for as long now... |
I have an entire project on hold because of this bug, so PLEASE fix it. |
The setTimeout() trick didn't work for me. Although it doesn't seem to affect deployed functions at all (sls invoke to the deployed functions works fine), so this is not really as urgent as I thought, but it is still annoying. |
Yes. It is super annoying having to cmd+. every time I run the function. But yes,Just annoying not breaking anything. |
Same problem here :( |
Maybe you guys could try setting some dummy data as stated on this issue. Something like: |
I've been having the same issue on 1.60.5 and other recent version. Here's a solution that's less than ideal, but still a solution:
This will force your local serverless version to run on version 1.48.0 which appears to be the last version released before the bug was introduced. This solution is less than ideal, but it's the only thing that's working for me. If it's any hint to the maintainers, I've found that problems arise when invoking a local function where I call MongoDB in Nodejs v10.x. If I don't do this the functions won't hang. However, in version 1.48.0 and lower, everything works fine no matter what. |
I'm also facing this bug, nodejs v12.x & serverless core 1.61.2 |
Looks like it was fixed on latest version.
…On Sun, Jan 19, 2020, 14:35 Abhishek ***@***.***> wrote:
I'm also facing this bug
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6679?email_source=notifications&email_token=AFZOCQ2Y7V77NKXQJSUVXWLQ6SFNJA5CNFSM4IWKKNQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJKXWJY#issuecomment-576027431>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZOCQ3R7ORQLWNQFCEC4QTQ6SFNJANCNFSM4IWKKNQA>
.
|
Just pulled the latest from npm, and it still hangs on git-bash on windows 10 x64 |
this actually solved it for me at the time- guess not anymore |
Weird. My latest pulled from npm (on win64 too) solved the issue.
…On Sun, Jan 19, 2020, 17:02 Abhishek ***@***.***> wrote:
Maybe you guys could try setting some dummy data as stated on this issue
<serverless/serverless-google-cloudfunctions#129>
.
Something like:
serverless invoke local -f functioname -l --data {}
this actually solves it
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6679?email_source=notifications&email_token=AFZOCQYJJEREMXHEII4Y7ODQ6SWWTA5CNFSM4IWKKNQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJK3ADQ#issuecomment-576040974>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZOCQ5RXR4JDNT2IVTLGI3Q6SWWTANCNFSM4IWKKNQA>
.
|
This was fixed but is now back again in the latest release, 1.63.0... :( |
Yeah. It's back again here too... But I got used to it already. Just do a
CTRL+C once the invoke local hangs.
…On Wed, Feb 12, 2020, 10:10 Anders Wasen ***@***.***> wrote:
This was fixed but is now back again in the latest release, 1.63.0... :(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6679?email_source=notifications&email_token=AFZOCQ6RHBKJBVE3X5OWA33RCPYLNA5CNFSM4IWKKNQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELQWRFY#issuecomment-585197719>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZOCQ7IFNMYQGYMHZ2EW5LRCPYLNANCNFSM4IWKKNQA>
.
|
Facing the same issue on 1.64.0. Please add support for this as it breaks CI/CD builds. |
Running 1.64.1 here.
|
just checked in on this issue. |
Still here for 1.73. invoking a deployed lambda is fine, just local that hangs. Does anyone have a work around? I need to invoke in a bash a for loop a few hundred times to fake data from an SQS queue. |
@jdchmiel I'm using a hack right now to get around this:
This will run version 1.48.0 locally for you and things won't hang. This version is the latest before the hanging issue started. I'm also still patiently waiting for a fix, and using this hack to run SLS locally for development purposes, while deploying updated serverless versions to production. |
having the same issue with:
|
same issue in 1.80.0 as well |
Any update on this issue? Even the expected output is not coming: |
It seems the only way to really fix this is to stop using sls framework at
all and rethinking your backend. Do that and be happy.
Em seg, 21 de set de 2020 18:04, pradeepngupta <notifications@github.com>
escreveu:
… Any update on this issue?
I am facing the same issue with:
Your Environment Information ---------------------------
Operating System: win32
Node Version: 12.18.1
Framework Version: 2.1.1
Plugin Version: 4.0.4
SDK Version: 2.3.2
Components Version: 3.1.3
Even the expected output is not coming:
$ sls invoke local -f hello
Serverless: Running "serverless" installed locally (in service
node_modules)
Serverless: DOTENV: Loading environment variables from .env:
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6679 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZOCQ4PEBZLFERAMFBB6RTSG65WJANCNFSM4IWKKNQA>
.
|
same issue here
|
Any update? This is blocking me to use. the server-mocha-plugin which hangs after the tests are executed. |
Been having this issue past few days in both Serverless Offline and the deployed Lambda on AWS. |
For me, my issue was a Redis connection that was kept open, so the symptom seems to be that if client connections (of any kind) are not forcefully quit, it will remain open. In my case, I had to Hope this helps someone else diagnose similar issues! |
This was the issue for me also, I had a connection open to a MYSQL db that needed to be closed. |
Thanks! I'm using TypeORM and destroying the connection before returning the data solved the issue for me |
This is a Bug Report
Description
What went wrong?
After invoking a function locally, the console does not exit, it hangs forever until I CTRL+C.
What did you expect should have happened?
Should exit after response is sent to stdout.
What was the config you used?
Here is a sample code using firebase:
Then invoking it like this:
results in the intended function working and logging properly, but the console hangs forever without exiting the action.
Interestingly, if I simulate the same use case using
setTimeout()
the issue is not reproduced. For example this works and exits correctly:Nothing. The console shows the expected output (a "user" object in the example provided), but it hangs without closing and any further message.
Similar or dependent issues:
Additional Data
The text was updated successfully, but these errors were encountered: