We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Seems to be from ef5dffc
Steps to reproduce
node simple-test.js
% node simple-test.js (node:62616) [DEP0168] DeprecationWarning: Uncaught N-API callback exception detected, please run node with option --force-node-api-uncaught-exceptions-policy=trueto handle those exceptions properly. (Use `node --trace-deprecation ...` to show where the warning was created) (node:62616) [DEP0168] DeprecationWarning: Uncaught N-API callback exception detected, please run node with option --force-node-api-uncaught-exceptions-policy=trueto handle those exceptions properly. Simple test passed % node --trace-deprecation --force-node-api-uncaught-exceptions-policy=trueto simple-test.js undefined:0 [Error: Failed to unref Buffer reference in Custom GC] { code: 'GenericFailure' } Node.js v18.12.1
napi@2.10.2 doesn't produce any warnings
I think that problem is here, but I can't figure out how to fix it.
#[napi] pub async fn compress(input: Either<String, Buffer>) -> Result<Buffer> { let input: &[u8] = match &input { Either::A(str) => str.as_bytes(), Either::B(buf) => buf.as_ref(), // <------- this ref }; let mut output = Vec::new(); let mut encoder = ZstdEncoder::new(&mut output); tokio::io::AsyncWriteExt::write_all(&mut encoder, input) .await .unwrap(); encoder.shutdown().await?; Ok(Buffer::from(output)) }
The text was updated successfully, but these errors were encountered:
Experiencing the same problem. napi@2.10.2 indeed does not throw the mentioned exception.
napi@2.10.2
Sorry, something went wrong.
Brooooooklyn
No branches or pull requests
Seems to be from ef5dffc
Steps to reproduce
node simple-test.js
napi@2.10.2 doesn't produce any warnings
I think that problem is here, but I can't figure out how to fix it.
The text was updated successfully, but these errors were encountered: