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

[v2] FATAL ERROR: v8::HandleScope::CreateHandle() #5245

Closed
pr1ntr opened this issue Oct 15, 2020 · 13 comments · Fixed by parcel-bundler/source-map#43
Closed

[v2] FATAL ERROR: v8::HandleScope::CreateHandle() #5245

pr1ntr opened this issue Oct 15, 2020 · 13 comments · Fixed by parcel-bundler/source-map#43

Comments

@pr1ntr
Copy link

pr1ntr commented Oct 15, 2020

🐛 bug report

Seems like when I try to build it sporadically spits this node error out. There is no rhyme or reason to it afaik.

here is a full output log with the error

.babelrc

{
  "presets": ["@babel/preset-env", "@babel/preset-react"],
  "plugins": [
    [
      "babel-plugin-styled-components",
      {
        "cssProp": true,
        "displayName": true
      }
    ],
    ["@babel/plugin-proposal-class-properties", { "loose": true }],
    ["@babel/plugin-proposal-optional-chaining"]
  ]
}

.parcelrc

{
  "extends": "@parcel/config-default",
  "transformers": {
    "*.{jpg,png,svg}": ["@parcel/transformer-raw"]
  }
}

script.

{"scripts": {
    "build": "parcel build ./src/index.html --dist-dir dist --no-source-maps"
}}

🤔 Expected Behavior

It builds without Exit 134

😯 Current Behavior

Well it actually builds but the error exit with code 134 which causes CI exit code 1 and not continue the deployment.

💁 Possible Solution

Could be something to do with not enough resources?

🔦 Context

This happens on local and ci builds, and local dev. It also happens when i ctrl-c the dev server. It is sporadic.

💻 Code Sample

Sorry all NDA

🌍 Your Environment

Happens on on my i5 4670k with 16gb ram, win 10
Happens in travis on xenial

@mischnic
Copy link
Member

mischnic commented Oct 16, 2020

Which Node version are you using? Node 12?

Another bug report I found: https://community.netlify.com/t/fatal-error-v8-createhandle-cannot-create-a-handle-without-a-handlescope/22957

Might be related: nodejs/node-addon-api#730

@pr1ntr
Copy link
Author

pr1ntr commented Oct 16, 2020

Yes I am using node 12

@mischnic
Copy link
Member

So I guess there is a Node 12 bug with the Napi::ObjectWrap destructor....

https://github.com/parcel-bundler/source-map/blob/1fc437abc31d6d7cb9b532f1c5e2ac82a3d149fb/src/napi/SourceMap.cpp#L5

@pr1ntr
Copy link
Author

pr1ntr commented Oct 20, 2020

Seems to be fixed with node 14. I also think it has to do with the size of the build.

@NordlingDev
Copy link

So I guess there is a Node 12 bug with the Napi::ObjectWrap destructor....

https://github.com/parcel-bundler/source-map/blob/1fc437abc31d6d7cb9b532f1c5e2ac82a3d149fb/src/napi/SourceMap.cpp#L5

@mischnic But OP is clearly building using parameter --no-source-maps. I'm having the same problem. I don't need source maps either.

@Lusito
Copy link

Lusito commented Nov 10, 2020

In case this helps: I recently updated from 2.0.0-beta.1 to 2.0.0-nightly.443 and suddenly I got this error with every build. on beta.1 no issues at all.

@mischnic
Copy link
Member

@Lusito Any chance you can figure out in which nightly version this started to happen? 2.0.0-nightly.300 was the very next version after beta.1 (https://www.npmjs.com/package/parcel?activeTab=versions)

Which Node version are you using?

@Lusito
Copy link

Lusito commented Nov 11, 2020

@mischnic The change from 2.0.0-nightly.389 to 2.0.0-nightly.395 brings the problem (there are no other nightlies in between).

I am on node v12.16.3.

@mischnic
Copy link
Member

mischnic commented Nov 11, 2020

Thanks! These are the changes between the two nightlies 288396a...ac21b52

Then it's probably #5106, so from @parcel/[email protected] to @parcel/[email protected]: parcel-bundler/source-map@v2.0.0-alpha.4.13...v2.0.0-alpha.4.15. Strangely enough, no native code was changed between these versions?

cc @DeMoorJasper any ideas?

@Lusito
Copy link

Lusito commented Nov 11, 2020

From the short description i would assume that node-addon-api contains native code. Its version was bumped from 2 to 3. That would be the first thing i would take a look at.

@Lusito
Copy link

Lusito commented Nov 14, 2020

Just tried it on my fresh linux manjaro setup where I am able to reproduce the issue on node 12.6.3 not with 15.2.0. I can try other node versions here if it helps.

@Lusito
Copy link

Lusito commented Nov 14, 2020

Node 12.18.3 is the first that works again. I think it might be this issue: nodejs/node#33867

@mischnic
Copy link
Member

mischnic commented Nov 14, 2020

Thanks! Looking at the "n-api" list in https://github.com/nodejs/node/releases/tag/v12.18.3, I'd say it's nodejs/node#33508? This issue is linked in there: nodejs/node-addon-api#722, it has the exact same error message we are seeing here.

@NordlingDev @pr1ntr does using 12.18.3 fix it for you? In that case, I'd say upgrading Node is a(n) acceptable ("workaround").

nodejs/node-addon-api#730 (comment):

will most likely be backported to all LTS versions, we should investigate whether we are able to also fix this in node-addon-api, because folks may not necessarily be running the latest of one of the LTS versions

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

Successfully merging a pull request may close this issue.

4 participants