Comments (15)
What the timeout do you set on your Lambda function? You can try to increase it to see if it is resolved.
from serverless-express.
Set for 2min but no change. It fails after 200ms.
from serverless-express.
{ [Error: socket hang up] code: 'ECONNRESET' }
from serverless-express.
I went ahead and called the function from api gateway and I get the expected result, however the test fails. Perhaps, this is a problem of the test configuration. Here is the test code.
{ "body": "{\"test\":\"body\"}", "resource": "/{proxy+}", "requestContext": { "resourceId": "123456", "apiId": "1234567890", "resourcePath": "/{proxy+}", "httpMethod": "POST", "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", "accountId": "123456789012", "identity": { "apiKey": null, "userArn": null, "cognitoAuthenticationType": null, "caller": null, "userAgent": "Custom User Agent String", "user": null, "cognitoIdentityPoolId": null, "cognitoIdentityId": null, "cognitoAuthenticationProvider": null, "sourceIp": "127.0.0.1", "accountId": null }, "stage": "prod" }, "queryStringParameters": { "foo": "bar" }, "headers": { "Via": "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)", "Accept-Language": "en-US,en;q=0.8", "CloudFront-Is-Desktop-Viewer": "true", "CloudFront-Is-SmartTV-Viewer": "false", "CloudFront-Is-Mobile-Viewer": "false", "X-Forwarded-For": "127.0.0.1, 127.0.0.2", "CloudFront-Viewer-Country": "US", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Upgrade-Insecure-Requests": "1", "X-Forwarded-Port": "443", "Host": "1234567890.execute-api.us-east-1.amazonaws.com", "X-Forwarded-Proto": "https", "X-Amz-Cf-Id": "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==", "CloudFront-Is-Tablet-Viewer": "false", "Cache-Control": "max-age=0", "User-Agent": "Custom User Agent String", "CloudFront-Forwarded-Proto": "https", "Accept-Encoding": "gzip, deflate, sdch" }, "pathParameters": { "proxy": "path/to/resource" }, "httpMethod": "GET", "stageVariables": { "baz": "qux" }, "path": "/allPrizeData" }
from serverless-express.
The testing of the proxy calling the function from api gateway also fails. {get} {/allPrizeData}
from serverless-express.
but again, the actual call to the api gateway yields the expected result.
api gateway link
from serverless-express.
Can you turn on the logging for the outgoing request?
from serverless-express.
Where?
from serverless-express.
In your Lambda function code, you can attach a request logging for capture an outgoing request. If you can use the exact same parameter without this framework to connect your firebase endpoint, it will help us a lot on investigate the issue.
from serverless-express.
Ok, but it is only failing on the lambda test. The function is actually working. I will send the results later.
from serverless-express.
I checked into the logging, but I am a little unclear on how to put it in the function since it is generated with the archive file that I upload. If you can be more specific, I will do it.(you already have the code, if that is easier) In the mean time here is the log from the test.
START RequestId: 5eef6228-296d-11e7-a832-4d3ea16d9210 Version: $LATEST
2017-04-25T04:12:18.534Z 5eef6228-296d-11e7-a832-4d3ea16d9210 allPrizesCalled
2017-04-25T04:12:18.831Z 5eef6228-296d-11e7-a832-4d3ea16d9210 { Error: socket hang up
at createHangUpError (_http_client.js:253:15)
at Socket.socketOnEnd (_http_client.js:345:23)
at emitNone (events.js:91:20)
at Socket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9) code: 'ECONNRESET' }
END RequestId: 5eef6228-296d-11e7-a832-4d3ea16d9210
REPORT RequestId: 5eef6228-296d-11e7-a832-4d3ea16d9210 Duration: 629.67 ms Billed Duration: 700 ms Memory Size: 128 MB Max Memory Used: 25 MB
from serverless-express.
You can use this library to capture the request, then zip the code and upload to your Lambda function.
from serverless-express.
ok, will try this tomorrow.
from serverless-express.
Sorry, I can not help out on this any longer right now, I have some other pressing matters. I will come back to this later, but if you want to close it for now, I understand.
from serverless-express.
from serverless-express.
Related Issues (20)
- requests to /foo/bar to an API Gateway (v1) resource of /foo/{proxy+} return 404 as they are routed to /bar HOT 5
- Can't access static files behind Cloudfront
- Logger doesn't work HOT 3
- [404 Not Found] API Gateway HTTP Protocol Path Matching with stage HOT 3
- `body` data not passed correctly to the express app HOT 1
- Unable to Stream Responses from AWS Lambda HOT 5
- Is there support for NodeJS Server from HTTP module HOT 1
- Pradeep wants to pay 0 USD to have this issue fixed
- NestJS & Unable to determine event source based on event HOT 5
- RIE instructions missing
- Incompatibility with AWS API Gateway HOT 8
- Binary Content Type with Dots or Other Regex
- @codegenie/serverless-express has not been release to npm HOT 2
- NestJS + PG Aurora Serverless cold start HOT 4
- Serverless with Node14 & Yarn unable to install @vendia/serverless-express via serverless package/deploy. Pulls latest @CodeGenieApp tag instead HOT 2
- "postbuild" commnad can't work in Windows HOT 3
- `Authorization` headers not passed properly through Api Gateway v1.
- Swagger for basic-starter nestjs template
- Failing works with files
- Support hyper-express HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-express.