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

Implement http2 #887

Closed
jgunzelman88 opened this issue Jul 26, 2022 · 57 comments
Closed

Implement http2 #887

jgunzelman88 opened this issue Jul 26, 2022 · 57 comments
Assignees
Labels
enhancement New feature or request node.js Compatibility with Node.js APIs

Comments

@jgunzelman88
Copy link

Version

0.1.5

Platform

Darwin ip-192-168-1-189.us-east-2.compute.internal 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64

What steps will reproduce the bug?

Don't know if this is just a module that hasn't been added yet but I am trying to use the GCP datastore apk and I got

error: Could not resolve: "http2". Maybe you need to "bun install"?

I did bun add http2 and this was resolved but then I get

error: Cannot find module "./framer" from "bun:wrap"

How often does it reproduce? Is there a required condition?

https://github.com/poketrax/pokepull/tree/v1.0.0

bun ./src/pokepull.ts

Or install the gcp datastore apk
bun install @google-cloud/datastore
instantiate a Datastore object.

What is the expected behavior?

Module should resolve.

What do you see instead?

error: Cannot find module "./framer" from "bun:wrap"

Additional information

Let me know if this is something I need to submit to GCP or if I did something stupid

@jgunzelman88 jgunzelman88 added bug Something isn't working needs repro Needs an example to reproduce labels Jul 26, 2022
@thiagozanetti
Copy link

Same behavior happening here but my issue is with GRPC from etcd3.

@jgunzelman88
Copy link
Author

So bug is gone now in 0.1.7 but now i get a segmentation fault :/

@jgunzelman88
Copy link
Author

its a seg fault at 0 so probably a null pointer error but i'm no zig expert.
SegmentationFault at 0x0000000000000000

@imadbz
Copy link

imadbz commented Aug 19, 2022

same issue with "firebase-admin".
http2 not found, when I "bun add" it, I get
"error: Cannot find module "./framer" from "bun:wrap"

bun v0.1.9

@jgunzelman88
Copy link
Author

I am now getting "error: Cannot find module "./framer" from "bun:wrap" again

bun v0.1.10

@irdevp
Copy link

irdevp commented Aug 25, 2022

error: Cannot find module "./framer" from "bun:wrap"
v0.1.10

@Electroid Electroid added enhancement New feature or request node.js Compatibility with Node.js APIs and removed bug Something isn't working needs repro Needs an example to reproduce labels Nov 3, 2022
@Electroid Electroid changed the title error: Cannot find module "./framer" from "bun:wrap" Implement support for http2 module Nov 3, 2022
@Electroid
Copy link
Contributor

We do not support the Node.js http2 module yet, but are tracking support for it.

@evelant
Copy link

evelant commented Feb 3, 2023

I just discovered bun and got hit with this on the very first script I tried to run 😦

The script talks to firebase services so uses grpc so requires http2. Back to ts-node for now 🤷

@AndreaCuneo
Copy link

Same here: gRPC and gRPC-web is getting traction in new projects, firebase in particular, and bun is grand for new projects. Also this hits with a segmentation fault which takes time to diagnose to this issue..

@lewisl9029
Copy link

Looks like @aws-sdk/client-s3 is also blocked by this. For S3 I can probably just replace with something fetch-based, but could be more problematic for other aws services.

@tsp1998
Copy link

tsp1998 commented Mar 18, 2023

I am getting http2 error for googleapis

Error: Cannot find package "http2" from "/home/royaltsp/tsp/node/google-drive-files/google-drive-demo/node_modules/googleapis-common/build/src/http2.js"

Code: https://github.com/tsp1998/google-drive-demo

@Electroid Electroid changed the title Implement support for http2 module Implement http2 Mar 23, 2023
@NyanHelsing
Copy link

kind of a big blocker for adoption. I literally can't solve my problem using bun so now I need to rewrite for deno or node.js which is a massive drag.

@philosofonusus
Copy link

Massive block for me

@VrindavanSanap
Copy link

Yeah me too firebase does not work due to this

@birkskyum birkskyum mentioned this issue Jul 22, 2023
2 tasks
@birkskyum
Copy link
Collaborator

Still issue in 0.7.1 - @Jarred-Sumner will this be in the 1.0 release?

@cirospaciari cirospaciari self-assigned this Aug 24, 2023
@Zacaria
Copy link

Zacaria commented Oct 24, 2023

@hugo082
Copy link

hugo082 commented Oct 24, 2023

Based on the changes I see it plan to fix the got issue too right?

@netaisllc
Copy link

This one also seems to be blocking use of Bun with FaunaDB JS SDK. I have a POC script that gives this failure:

                            ^
NotImplementedError: node:http2 connect is not yet implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/887
 code: "ERR_NOT_IMPLEMENTED"

      at new NotImplementedError (internal:shared:13:26)
      at internal:shared:2:68
      at node:http2:2:44
      at connect_fn (/Users/kevinm/Projects/Strongcloud/fauna-lab/issue_6204/node_modules/fauna/dist/node/index.js:420:24)
      at /Users/kevinm/Projects/Strongcloud/fauna-lab/issue_6204/node_modules/fauna/dist/node/index.js:461:22
      at new Promise (:1:20)
      at doRequest_fn (/Users/kevinm/Projects/Strongcloud/fauna-lab/issue_6204/node_modules/fauna/dist/node/index.js:437:9)
      at /Users/kevinm/Projects/Strongcloud/fauna-lab/issue_6204/node_modules/fauna/dist/node/index.js:368:21
      at request (/Users/kevinm/Projects/Strongcloud/fauna-lab/issue_6204/node_modules/fauna/dist/node/index.js:363:16)
      at /Users/kevinm/Projects/Strongcloud/fauna-lab/issue_6204/node_modules/fauna/dist/node/index.js:1459:27

  } ]

@treeder
Copy link

treeder commented Nov 15, 2023

Also seems to block usage of all the firebase admin packages: firebase/firebase-admin-node#2300

@rupurt
Copy link
Contributor

rupurt commented Nov 18, 2023

Looks like the initial http2 branch just got merged 🎉 #6761

I guess it'll drop in 1.0.13

@naterkane
Copy link

well, partially drop. it doesn't look ready for action if you read the PR's description. i know it won't include enough support for my use case (unfortunately)

@birkskyum
Copy link
Collaborator

birkskyum commented Nov 18, 2023

Was excited to try the new 1.0.13 release that claims "http2 module work now".

Screenshot 2023-11-18 at 16 32 55

I still see this though:

error when starting dev server:
NotImplementedError: node:http2 createSecureServer is not yet implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/887
    at new NotImplementedError (internal:shared:13:14)
    at <anonymous> (internal:shared:2:35)
    at <anonymous> (node:http2:50:33)
    at processTicksAndRejections (:61:39)

That said - Great to see it progress! 👏

@debkanchan
Copy link

Great to see http2 finally land. Was excited to try it but faced the following error

NotImplementedError: node:http2 createServer is not yet implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/887

@rupurt
Copy link
Contributor

rupurt commented Nov 20, 2023

It's client only for now @DebkanchanSamadder. Very much looking forward to the server!

@marc-barry
Copy link

Am I correct in understanding that with https://bun.sh/blog/bun-v1.0.13#http2-client-support that only the client side is implemented at this time. I see that TLS on the server side is implemented and available under https://bun.sh/docs/api/http#tls but is it that there is no HTTP/2 support at all (natively) in Bun?

@birkskyum
Copy link
Collaborator

@marc-barry , yes, the http2.createServer and http2.createSecureServer aren't implemented yet, so only client for now

@deathemperor
Copy link

deathemperor commented Jan 3, 2024

This prevents running vite with Bun in development when server.https is used. Looking forward for this support.

@shackra
Copy link

shackra commented Jan 9, 2024

beware: you won't be able to write a gRPC server with bun until this get resolved

@MarcStdt
Copy link

Is there any ETA for the server part?
I could not find anything in the roadmap.

@dgrbrady
Copy link

dgrbrady commented Feb 9, 2024

beware: you won't be able to write a gRPC server with bun until this get resolved

Man I wish this was more clear in the release notes. I was super excited to implement my gRPC server in bun, but when I run my .ts file, it just quits the process and doesn't stay open.

@vsly-ru
Copy link

vsly-ru commented Feb 9, 2024

@dgrbrady @MarcStdt @deathemperor I've opened a new issue #8823, focused solely on the server side of HTTP2 support. Judging by the release notes, the core team chooses features to implement based on the number of upvotes for an issue. The upvotes on this issue may already be considered "solved." Therefore, I believe we need to upvote the new one to make progress on the matter.

@Electroid
Copy link
Contributor

Thanks @vsly-ru for opening that issue. Our intention was to keep this issue open until we support the HTTP2 server as well, but it's probably a good idea that we use a new issue to get more realistic upvotes.

To be clear, we do plan to support the HTTP2 server. If that's something you're depending on, please upvote the issue: #8823

If you only need the HTTP2 client, as of Bun v1.0.13 it is supported.

@birkskyum
Copy link
Collaborator

Thanks @vsly-ru for making a dedicated ticket for http2 server part:

@guest271314
Copy link
Contributor

If you only need the HTTP2 client, as of Bun v1.0.13 it is supported.

@Electroid The HTTP client doesn't work.

@nasriyasoftware
Copy link

I'm using Bun v1.1.4, and the issue still persisting.

NotImplementedError: node:http2 createSecureServer is not yet implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/887

How is this issue closed? I see some comments in this artivle claiming that it's working on earlier versions, but how come!? It's been five months now

@birkskyum
Copy link
Collaborator

birkskyum commented May 9, 2024

@nasriyasoftware this ticket was closed when http2 client was implemented, the title just wasn't updated. The server issue is still open, and the most upvoted open ticket in bun repo at this point.

@nasriyasoftware
Copy link

@birkskyum thank you ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request node.js Compatibility with Node.js APIs
Projects
None yet
Development

No branches or pull requests