Skip to content
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

aws-xray-sdk-core makes bad side effects on nodejs8.10 runtime ("null" return value) #29

Closed
mooyoul opened this issue Apr 9, 2018 · 3 comments

Comments

@mooyoul
Copy link

mooyoul commented Apr 9, 2018

I've found super annoying issue after migrating to nodejs8.10 runtime with async handler.

Short Reproducible code

"use strict";

module.exports.foo = async (event) => {
  console.log("got event: %j", event);

  require("aws-xray-sdk-core");

  return { data: "oh my!" };
};

Expected Result

Lambda Execution result should be { data: "oh my!" }.

Actual Result

On lambda nodejs8.10 runtime: returns null.
On native node 8.10 docker image: returns { data: "oh my!" }

If comment require("aws-xray-sdk-core") line, lambda nodejs8.10 runtime returns expected { data: "oh my!" }.

I wasted about 8 hours to investigate the root cause of this problem. I could not find any documents.
At least please write compatibility note about node.js runtime on documentation for customers.

@haotianw465
Copy link
Contributor

Sorry about the inconvenience. We are in a testing process with the new Lambda 8.10 runtime to see what works, what breaks and what needs to be done to fix the issues. We will have our doc team soon post a note in our user guide about the current SDK doesn't work with the new async handler.

@haotianw465
Copy link
Contributor

I successfully reproduced the issue with the example you gave. I'm closing this in favor of #27 so we all have a single place to share updates/findings/fixes.

We will continue to look at 8.10 support and will update #27 as soon as we have any new update.

@mooyoul
Copy link
Author

mooyoul commented Apr 10, 2018

okay, i'll share some findings to #27. thanks @haotianw465 !

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

No branches or pull requests

2 participants