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

SegmentationFault when using Honojs on Bun and testing using Hoppscotch. #915

Closed
ethndotsh opened this issue Jul 29, 2022 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@ethndotsh
Copy link

ethndotsh commented Jul 29, 2022

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?

  1. Create a new Bun project
  2. Install Hono using bun add hono
  3. 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,
};
  1. Visit Hoppscotch.io and make a request to http://localhost:3001
  2. The server should crash with a SegmentationFault
  3. 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

@ethndotsh ethndotsh added bug Something isn't working needs repro Needs an example to reproduce labels Jul 29, 2022
@xhyrom
Copy link
Collaborator

xhyrom commented Jul 29, 2022

With native Bun.serve it works?

@sno2 sno2 added the segfault label Jul 29, 2022
@ethndotsh
Copy link
Author

No it is still broken even when using Bun.serve

@xhyrom
Copy link
Collaborator

xhyrom commented Jul 29, 2022

Can you send full segmentation fault?

@ethndotsh
Copy link
Author

[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

@Jarred-Sumner Jarred-Sumner removed the needs repro Needs an example to reproduce label Jul 29, 2022
@zhuzilin
Copy link
Collaborator

@cursecodes Hi, can you try again with the latest bun? (bun upgrade). just tried with v0.1.10, it works fine now :)

@Jarred-Sumner
Copy link
Collaborator

This is fixed as of 0.1.10 - if you see this happening again please comment and we'll re-open

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

5 participants