-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
Post Requests Freezing On Serverless Offline #1482
Comments
thank you for the repro @benjamin852 . I don't think your issue has anything to do with the node version being used. at a quick glance, I would think it's the way you are using your handler also does not match the exported function. could you create a repository I can clone and have a look at? also, if you can, reduce the repro to the smallest possible you are able to achieve. e.g. remove webpack, dotenv plugin etc. could you also add a working route with a |
Hey @dnalborczyk Thanks for the response. Sorry I forgot to add my handler file being referenced in the yaml file So here is my handler file:
Regarding the working get request I was referencing before it's as simple as switching the test route to this
And then calling a get request from postman and it works fine. The reason I suspect its my node version is because recently upgrade my node to the newest version, and since the upgrade was when I began experiencing this problem (originally the post requests were working fine), and the answers in the post I referenced before all mentioned node versioning problems. I am trying to debug right now with this node version and I will downgrade node versions as a last resort if nothing else works to see if that fixes it. Thanks again for the help please let me know if I have added enough code to make my problem clear. |
Okay so as referenced in (#1150) issue I downgraded my node to 15.4 and now post request seems to work fine. I will leave this open temporarily as I am assuming there is a better way to fix this than having to downgrade to a node version from two years ago. |
I was able to successfully run your code with node v18.4 on macos for GET and POST, albeit with some modifications. could you create a repository with your repro where I can have a look at? |
So I created a brand new repo with just the test route and it worked! So I am guessing now that it is something else in my app that was causing it to mess up, so I can try work backwards not to catch what it is, perhaps just some dependencies versioning. Odd that revert node back to old version fixed it though. Thank you for the help. I will close this for now once I figure out what was causing this I will post back with my fix. |
This was just a versioning issue with my package serverless-offline. Updated it to latest version and now post requests work |
Hi all. I am having the same hanging post error as in:
#1150
My get requests are working totally fine my post requests for some reason keep freezing even in a super simple test route I have
Here is my serverless.yml file
I recall reading in the other issue I mentioned that it had something to do with a node version, and I am opening a new issue as the last comment on the other thread asked for people to open a new issue if they see this problem rather than re-open the old issue.
Anyway, my current node version that I am running is:
Hope there is a fix for this soon if not I will just downgrade my node version, unless there is something else anyone can point out that I am doing wrong. Again my get requests are fine only my post requests are freezing.
Thank you.
The text was updated successfully, but these errors were encountered: