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

[Bug] on using bun not able to connect temporal #1618

Open
satya-nected opened this issue Jan 31, 2025 · 1 comment
Open

[Bug] on using bun not able to connect temporal #1618

satya-nected opened this issue Jan 31, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@satya-nected
Copy link

What are you really trying to do?

I am trying create worker on the top of bun runtime, but not able to connect to temporal.

Describe the bug

Minimal Reproduction

on running this function program stucks and not responsing...

async function runWorker() {
  const connection = await NativeConnection.connect({
    address: 'localhost:7233',
  });
  const worker = await Worker.create({
    connection: connection,
    workflowsPath: require.resolve('./workflows'),
    activities: require('./activities'),
    taskQueue: 'my-task-queue',
  });

  console.log('Worker started...');
  await worker.run();
}

Environment/Versions

  • OS and processor: Ubuntu
  • Temporal Version: sdk version 1.11.7

Additional context

@satya-nected satya-nected added the bug Something isn't working label Jan 31, 2025
@mjameswh
Copy link
Contributor

We don't support Bun at this time. We certainly hope that we'll reach that objective at some point in the future, but we are not actively working in that direction just now. It is simply too early for that.

For example, the specific issue you describe is due to a difference in how bun checks the error argument on napi_throw vs what's done in Node. That breaks the method that Neon Binding uses to check either it is safe to call back into the JS environment at that time.

It is not worth fixing that issue in upstream projects just yet. Bun's team is already doing some awesome bug hunting work on their NAPI implementation. See for example this PR and this one. I'd expect a few rounds like these, so let's give them time to complete their efforts first, and then for other key dependencies to stabilize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants