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

Wrap finalizer for PromiseRaw failed (@napi-rs/canvas) #15383

Closed
RiskyMH opened this issue Nov 24, 2024 · 1 comment · Fixed by #15622 · May be fixed by #14501
Closed

Wrap finalizer for PromiseRaw failed (@napi-rs/canvas) #15383

RiskyMH opened this issue Nov 24, 2024 · 1 comment · Fixed by #15622 · May be fixed by #14501
Assignees
Labels
bug Something isn't working confirmed bug We can reproduce this issue napi Compatibility with the native layer of Node.js

Comments

@RiskyMH
Copy link
Member

RiskyMH commented Nov 24, 2024

What version of Bun is running?

1.1.36+ededc168c

What platform is your computer?

Linux 5.15.153.1-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

Install @napi-rs/canvas and make a JS file with:

import { Image } from "@napi-rs/canvas/js-binding.js"

const image = new Image();
image.src = "./anythinghere"; // doesnt need to be valid

What is the expected behavior?

no error or crash, like node

What do you see instead?

$ bun index.mjs
2 | import { Image } from "@napi-rs/canvas/js-binding.js"
3 |
4 | const image = new Image();
    ^
error: Wrap finalizer for PromiseRaw failed
 code: "ObjectExpected"

      at /index.mjs:4:1

Additional information

Reported on discord: https://discord.com/channels/876711213126520882/1310131351533654016

@RiskyMH
Copy link
Member Author

RiskyMH commented Dec 5, 2024

For anyone wondering a temporary solution:

# install fixed version from pr
$ bunx bun-pr 14501 

# run your scripts with it
$ bun-14501 run index.ts

The issue is fixed with #14501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed bug We can reproduce this issue napi Compatibility with the native layer of Node.js
Projects
None yet
2 participants