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

Segmentation Fault after any async work reading headers #489

Closed
gornostay25 opened this issue Jul 9, 2022 · 3 comments
Closed

Segmentation Fault after any async work reading headers #489

gornostay25 opened this issue Jul 9, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@gornostay25
Copy link
Contributor

I try to run SvelteKit build with custom adapter, but it returns segmentation fault
image

@FinnRG FinnRG added the bug Something isn't working label Jul 9, 2022
@gornostay25 gornostay25 changed the title Bun SegmentationFault at 140251732023200. SvelteKit Segmentation Fault after any async work reading headers Jul 9, 2022
@ItzDerock
Copy link

Ran into this issue too, doing anything that references the headers causes a crash

export default {
    port: 3000,
    async fetch(request: Request) {
        const body = await request.text();

        request.headers;

        return new Response("hello world");
    }
}

but after trying some more things, I found that creating and resolving your own promise works:
await new Promise(r => setTimeout(r, 500)) will not crash.

but calling things like await request.blob() or anything to do with the body of the request will cause it to crash.

@gornostay25
Copy link
Contributor Author

@Jarred-Sumner
Copy link
Collaborator

Fixed in Bun v0.1.8 I think

Definitely fixed now though

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