qnabot-on-aws icon indicating copy to clipboard operation
qnabot-on-aws copied to clipboard

UnhandledPromiseRejectionWarning: CREATE_FAILED

Open ravishankar82 opened this issue 2 years ago • 4 comments

Describe the bug ✖ QNA-dev-ravi-dev-master-1:CREATE_FAILED (node:12183) UnhandledPromiseRejectionWarning: CREATE_FAILED (node:12183) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:12183) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

To Reproduce Did nothing change in given code just follow the steps after downloading the code and ran npm run up. After that I got failed error as given above.

Expected behavior npm run up should be successful without fail if user not changing anything in downloaded code

Please complete the following information about the solution:

  • Node Version: v12.19.0

  • NPM version: 7.24.2

  • Code base Master v5.0.1

  • [ ] Region: us-east-1

  • [ ] Was the solution modified from the version published on this repository? No

  • [ ] If the answer to the previous question was yes, are the changes available on GitHub?

  • [ ] Have you checked your service quotas for the sevices this solution uses? Checked no issue with service quotas

  • [ ] Were there any errors in the CloudWatch Logs? Nope

ravishankar82 avatar Nov 18 '21 04:11 ravishankar82

Hey @ravishankar82 did you try re-deploying or deploying in another region just to confirm the issue persists? We have a known behavior where the custom resource creating OpenSearch resources times out if OpenSearch takes too long to create the Indexes

mohsenari avatar Nov 19 '21 15:11 mohsenari

Tried many times. But after investigation I found the issue and did resolve it by applying hacks.

Actually there is a Lambda named lexv2-build which are being build and uploaded it S3 buckect at the time npm run up but unfortunately py_modules is not being created. seems make command is being triggered for this. still not able to understand how make is executed at the time of npm run up command.

to build my project i ran make command manually for lexv2-build lambda.

ravishankar82 avatar Nov 23 '21 06:11 ravishankar82

Strange that lexv2-build didn't run make. It might have something to do with python configuration. There is a string chance that npm run up attempted to build for lexv2-build and failed but that didn't stop the npm run up process to stop. Any chance you have access to the logs of your initial npm run up? See if you can spot the error there. We are also working on putting some safeguards in the build process so that it stops the build if any of the builds in subdirectories are unsuccessful.

mohsenari avatar Nov 23 '21 15:11 mohsenari

Thanks @mohsenari for response.

Any chance you have access to the logs of your initial npm run up? Yes I went through the logs of npm run up and npm run bootstrap, no error we found just started all build zip for lambda is created and uploaded to S3. But not able to understand why make is executed.

ravishankar82 avatar Nov 24 '21 05:11 ravishankar82

Closing stale issue.

If there are concerns that this issue persists on the latest versions, please create a new issue.

ihmaws avatar Apr 18 '23 15:04 ihmaws