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 in napi_get_last_error_info for experimental N-API #30487

Closed
dmitryash opened this issue Nov 14, 2019 · 2 comments
Closed

Assertion failed in napi_get_last_error_info for experimental N-API #30487

dmitryash opened this issue Nov 14, 2019 · 2 comments
Labels
confirmed-bug Issues with confirmed bugs. node-api Issues and PRs related to the Node-API.

Comments

@dmitryash
Copy link

dmitryash commented Nov 14, 2019

  • Version: v10.16.3
  • Platform: Linux

If NODE_EXPERIMENTAL is defined then napi_get_last_error_info() asserts due to the fact that it ignores experimental error codes (e.g. napi_bigint_expected):

../src/node_api.cc:1412:napi_status napi_get_last_error_info(napi_env, const napi_extended_error_info**):
Assertion `(env->last_error.error_code) <= (napi_callback_scope_mismatch)' failed.

Documentation does not say clearly whether nodejs should be recompiled with NODE_EXPERIMENTAL or not.

@lpinca lpinca added the node-api Issues and PRs related to the Node-API. label Nov 17, 2019
@legendecas
Copy link
Member

#28702 should fix this issue. It should be backported to v10.x and v8.x.

Documentation does not say clearly whether nodejs should be recompiled with NODE_EXPERIMENTAL or not.

NODE_EXPERIMENTAL doesn't affect how Node.js N-API behaves, it's just a switch turning experimental APIs ON so that we could use these experimental API in our addons.

@gabrielschulhof
Copy link
Contributor

This has now been made part of v10.17.0 with 14e7a35. I don't believe it has much of a chance of landing in v8.x, given that v8.x has only a few weeks left before it goes EOL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

No branches or pull requests

4 participants