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

Assertion failed: (!(handle->flags & UV_CLOSED)), function uv__finish_close, file ../deps/uv/src/unix/core.c, line 251. #492

Closed
AkivaLandsberg opened this issue Apr 17, 2019 · 7 comments
Labels

Comments

@AkivaLandsberg
Copy link

AkivaLandsberg commented Apr 17, 2019

This is a Bug Report

Description

This is the error I am getting.

Serverless: Invoke webpack:compile:watch
Assertion failed: (!(handle->flags & UV_CLOSED)), function uv__finish_close, file ../deps/uv/src/unix/core.c, line 251.
error Command failed with signal "SIGABRT".

For bug reports:

  • What went wrong?
    Crashes during development.
  • What did you expect should have happened?
    That there should not be an error.
  • What was the config you used?
    Running serverless framework with the following plugins:
    plugins:
plugins:
  - serverless-offline
  - serverless-plugin-warmup
  - serverless-webpack
  - serverless-plugin-tracing

custom:
  webpack:
    webpackConfig: "webpack.config.js" # Name of webpack configuration file
    includeModules:
      forceInclude:
        - mysql2
      forceExclude:
        - aws-sdk

This is my webpack config:

module.exports = {
  entry: slsw.lib.entries,
  target: "node",
  mode: slsw.lib.webpack.isLocal ? "development" : "production",
  externals: [nodeExternals()],
  module: {
    rules: [
      {
        test: /\.js$/,
        loader: "babel-loader",
        include: __dirname,
        exclude: /node_modules/
      }
    ]
  }
};
  • What stacktrace or error message from your provider did you see?
Assertion failed: (!(handle->flags & UV_CLOSED)), function uv__finish_close, file ../deps/uv/src/unix/core.c, line 251.
error Command failed with signal "SIGABRT".

.babelrc

{
  "plugins": ["transform-runtime"],
  "presets": ["env", "stage-3"]
}

relevent dependecies

"dependencies": {
    "babel-runtime": "^6.26.0"
  },
  "devDependencies": {
    "aws-sdk": "^2.192.0",
    "babel-core": "^6.26.0",
    "babel-loader": "^8.0.5",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-stage-3": "^6.24.1",
    "serverless-offline": "^4.9.4",
    "serverless-plugin-tracing": "^2.0.0",
    "serverless-plugin-warmup": "^4.5.3-rc.1",
    "serverless-webpack": "^5.2.0",
    "webpack": "^4.30.0",
    "webpack-node-externals": "^1.7.2"
  }
  • Serverless-Webpack Version you're using: 5.2.0
  • Webpack version you're using: 4.30.0
  • Serverless Framework Version you're using: 1.40.0
  • Operating System: macOS 10.14.3
  • Stack Trace (if available):
@hassankhan
Copy link
Contributor

Hi there @AkivaLandsberg, is there any chance it could be one of the other plugins you're using? Have you tried commenting each one out and trying serverless-webpack in isolation?

@Zn4rK
Copy link
Contributor

Zn4rK commented Apr 21, 2019

Is that your whole package.json? Can you create a reproduction? Can you try it with the master branch?

@hassankhan hassankhan added the bug label Apr 23, 2019
@AkivaLandsberg
Copy link
Author

Hi there @AkivaLandsberg, is there any chance it could be one of the other plugins you're using? Have you tried commenting each one out and trying serverless-webpack in isolation?

I tried running it with just severless-offline and severless-webpack and it happened again.

@AkivaLandsberg
Copy link
Author

Is that your whole package.json? Can you create a reproduction? Can you try it with the master branch?

My code is not yet in production.

Here is my entire package.json

{
  "main": "handlers.js",
  "dependencies": {
    "airtable": "^0.5.9",
    "apollo-server-express": "^2.2.6",
    "aws-xray-sdk": "^2.1.0",
    "axios": "^0.18.0",
    "babel-runtime": "^6.26.0",
    "body-parser": "^1.18.3",
    "camelcase-keys": "^5.0.0",
    "chance": "^1.0.13",
    "cors": "^2.8.5",
    "express": "^4.16.3",
    "firebase-admin": "^7.2.0",
    "graphql": "^14.0.2",
    "graphql-iso-date": "^3.6.1",
    "graphql-type-json": "^0.3.0",
    "lambda-log": "^2.0.0",
    "libphonenumber-js": "^1.7.14",
    "lodash": "^4.17.11",
    "mysql2": "^1.5.2",
    "node-jose": "^1.1.0",
    "pluralize": "^7.0.0",
    "request": "^2.88.0",
    "request-promise-native": "^1.0.5",
    "sequelize": "^5.6.1",
    "serverless": "^1.32.0",
    "serverless-http": "^1.8.0",
    "stripe": "^6.20.0",
    "twilio": "^3.30.0"
  },
  "devDependencies": {
    "aws-sdk": "^2.192.0",
    "babel-core": "^6.26.0",
    "babel-loader": "^8.0.5",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-stage-3": "^6.24.1",
    "eslint": "^5.10.0",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-config-prettier": "^4.1.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^6.1.2",
    "eslint-plugin-prettier": "^3.0.0",
    "eslint-plugin-react": "^7.11.1",
    "graphql-playground-middleware-express": "^1.7.3",
    "prettier": "1.17.0",
    "serverless-offline": "^4.9.4",
    "serverless-plugin-tracing": "^2.0.0",
    "serverless-plugin-warmup": "^4.5.3-rc.1",
    "serverless-webpack": "^5.2.0",
    "webpack": "^4.30.0",
    "webpack-node-externals": "^1.7.2"
  },
  "scripts": {
    "start": "sls offline start --port 3006",
    "test": "echo \"Error: no test specified\" && exit 1",
    "prettier-watch": "onchange '**/*.js' -- prettier --write {{changed}}"
  },
  "author": "",
  "license": "ISC"
}

What would I try on master branch ? serveless-webpack?

@hassankhan
Copy link
Contributor

hassankhan commented Apr 28, 2019

Yes, please try serverless-webpack from the master branch:

yarn add https://github.com/serverless-heaven/serverless-webpack.git

OR

npm install --save https://github.com/serverless-heaven/serverless-webpack.git

Is it possible to find out what version of Node are you running?

I also noticed your .babelrc doesn't specify a target, could you add one similar to #459 (comment) as well?

@AkivaLandsberg
Copy link
Author

Thank you for your help! At this point, it seems like I am not having the issue anymore.

(I am using node 8.11.4. )

I pointed serverless-webpack at master, added a target to the .babelrc and also upgraded to the babel 7. I'm not sure which one fixed the issuse but seems to be resolved.

@praisegeek
Copy link

@AkivaLandsberg does it work lately?

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

No branches or pull requests

4 participants