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: Using queue in Miniflare with https: true produces the error "disconnected: peer disconnected without gracefully ending TLS session" #8221

Open
taylorcode opened this issue Feb 22, 2025 · 0 comments
Labels
bug Something that isn't working

Comments

@taylorcode
Copy link

taylorcode commented Feb 22, 2025

Which Cloudflare product(s) does this pertain to?

Miniflare

What versions are you using?

^3.20250214.0 [Miniflare], 22.13.0 [Node]

What operating system and version are you using?

Ubuntu 22.04.5 LTS

Please provide a link to a minimal reproduction

No response

Describe the Bug

From the Miniflare Getting Started guide (https://developers.cloudflare.com/workers/testing/miniflare/get-started/#dispatching-events)

When https: true is set, the workerd runtime produces an error when calling the queue method of a worker instance. This does not appear to the affect the functionality. Queues which work as expected when https is both true and false. The reported error seems unrelated.

Tested across several nodejs and miniflare versions.

main.js

const mf = new Miniflare({
  scriptPath: './worker.js',
  modules: true,
  https: true,
});

const worker = await mf.getWorker();

await worker.queue('ok', [
  {id: 'a', timestamp: new Date(0), attempts: 1, body: {foo: 1}},
]);

worker.js

export default {
  async fetch(request, env, ctx) {
    return new Response('Hello miniflare');
  },
  async queue(batch, env, ctx) {
    console.log('message received');
  },
}

Error:

workerd/server/server.c++:4032: error: Uncaught exception: kj/compat/tls.c++:416: disconnected: peer disconnected without gracefully ending TLS session
stack: /node_modules/@[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3479c90 /node_modules/@[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3566b87 /node_modules/@[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@352db90 /node_modules/@[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@357270a /node_modules/@[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3538230

Please provide any relevant error logs

No response

@taylorcode taylorcode added the bug Something that isn't working label Feb 22, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Feb 22, 2025
@taylorcode taylorcode changed the title 🐛 BUG: Using queues in Miniflare with https: true produces the error "disconnected: peer disconnected without gracefully ending TLS session" 🐛 BUG: Using queue in Miniflare with https: true produces the error "disconnected: peer disconnected without gracefully ending TLS session" Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
Status: Untriaged
Development

No branches or pull requests

1 participant