bun
bun copied to clipboard
SegmentationFault when using Honojs on Bun and testing using Hoppscotch.
Version
0.1.5
Platform
Darwin My-Air.lan 22.0.0 Darwin Kernel Version 22.0.0: Tue Jun 28 20:48:02 PDT 2022; root:xnu-8792.0.134.131.2~1/RELEASE_ARM64_T8103 arm64
What steps will reproduce the bug?
- Create a new Bun project
- Install Hono using
bun add hono
- Add this code to
index.js
:
import { Hono } from "hono";
import { cors } from "hono/cors";
const app = new Hono();
app.use("*", cors());
app.get("/", (c) => {
return c.json({ status: 200, message: "OK" }, 200);
});
export default {
port: 3001,
fetch: app.fetch,
};
- Visit Hoppscotch.io and make a request to
http://localhost:3001
- The server should crash with a SegmentationFault
- Test using another client such as Thunder Client or just Google Chrome, and it should respond with a status code of 200.
How often does it reproduce? Is there a required condition?
This happens every time I make a request using Hoppscotch.io, which is my preferred HTTP client.
What is the expected behavior?
A proper request that goes through with the HTTP status code of 200
What do you see instead?
No response and a SegmentationFault in the console.
Additional information
No response
With native Bun.serve it works?
No it is still broken even when using Bun.serve
Can you send full segmentation fault?
[0.37ms] ".env"
Nova server started
SegmentationFault at 18446181123756130306
–––– bun meta ––––
Bun v0.1.5 macOS Silicon 22.0.0
RunCommand: dotenv
Elapsed: 2349ms | User: 43ms | Sys: 62ms
RSS: 0.22GB | Peak: 0.22GB | Commit: 67.11MB | Faults: 73
–––– bun meta ––––
Ask for #help in https://bun.sh/discord or go to https://bun.sh/issues
This is after making a GET request
@cursecodes Hi, can you try again with the latest bun? (bun upgrade
). just tried with v0.1.10, it works fine now :)
This is fixed as of 0.1.10 - if you see this happening again please comment and we'll re-open