GithubHelp home page GithubHelp logo

Comments (15)

kahouieong avatar kahouieong commented on May 22, 2024

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.

dcorns avatar dcorns commented on May 22, 2024

Set for 2min but no change. It fails after 200ms.

from serverless-express.

dcorns avatar dcorns commented on May 22, 2024

{ [Error: socket hang up] code: 'ECONNRESET' }

from serverless-express.

dcorns avatar dcorns commented on May 22, 2024

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.

dcorns avatar dcorns commented on May 22, 2024

The testing of the proxy calling the function from api gateway also fails. {get} {/allPrizeData}

from serverless-express.

dcorns avatar dcorns commented on May 22, 2024

but again, the actual call to the api gateway yields the expected result.
api gateway link

from serverless-express.

kahouieong avatar kahouieong commented on May 22, 2024

Can you turn on the logging for the outgoing request?

from serverless-express.

dcorns avatar dcorns commented on May 22, 2024

Where?

from serverless-express.

kahouieong avatar kahouieong commented on May 22, 2024

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.

dcorns avatar dcorns commented on May 22, 2024

Ok, but it is only failing on the lambda test. The function is actually working. I will send the results later.

from serverless-express.

dcorns avatar dcorns commented on May 22, 2024

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.

kahouieong avatar kahouieong commented on May 22, 2024

You can use this library to capture the request, then zip the code and upload to your Lambda function.

from serverless-express.

dcorns avatar dcorns commented on May 22, 2024

ok, will try this tomorrow.

from serverless-express.

dcorns avatar dcorns commented on May 22, 2024

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.

dcorns avatar dcorns commented on May 22, 2024

from serverless-express.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.