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

Getting java.lang.NoSuchMethodError 'fs2.Stream respToBytes(org.http4s.Response, int)' after version upgrade #7171

Open
mdiasribeiro opened this issue Jun 19, 2023 · 3 comments

Comments

@mdiasribeiro
Copy link

mdiasribeiro commented Jun 19, 2023

After updating http4s (ember-client, circe, dsl) to latest 0.23.21 from 0.23.18 my swagger server is blowing up when a request arrives, with:

[info] 08:13:45.329 [main] ERROR Redirected from STDERR: [] Exception in thread "io-compute-1" java.lang.NoSuchMethodError: 'fs2.Stream org.http4s.ember.core.Encoder$.respToBytes(org.http4s.Response, int)' 
[info] 08:13:45.330 [main] ERROR Redirected from STDERR: [] 	at org.http4s.ember.server.internal.ServerHelpers$.send(ServerHelpers.scala:355) 
[info] 08:13:45.330 [main] ERROR Redirected from STDERR: [] 	at org.http4s.ember.server.internal.ServerHelpers$.$anonfun$runConnection$6(ServerHelpers.scala:459) 
[info] 08:13:45.330 [main] ERROR Redirected from STDERR: [] 	at cats.data.Kleisli.$anonfun$flatMap$4(Kleisli.scala:75) 
[info] 08:13:45.330 [main] ERROR Redirected from STDERR: [] 	at cats.effect.IOFiber.succeeded(IOFiber.scala:1190) 
[info] 08:13:45.330 [main] ERROR Redirected from STDERR: [] 	at cats.effect.IOFiber.runLoop(IOFiber.scala:240) 
[info] 08:13:45.330 [main] ERROR Redirected from STDERR: [] 	at cats.effect.IOFiber.asyncContinueSuccessfulR(IOFiber.scala:1358) 
[info] 08:13:45.330 [main] ERROR Redirected from STDERR: [] 	at cats.effect.IOFiber.run(IOFiber.scala:113) 
[info] 08:13:45.330 [main] ERROR Redirected from STDERR: [] 	at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:721) 

I've also updated cats-effect to 3.5.0, fs2 to 3.7.0 and tapir to 1.5.5. Using scala 2.13.11. Is this a regression or am I missing something?

@armanbilge
Copy link
Member

Have you updated ember-server to 0.23.21 as well? the versions must match precisely.

see similar issue in #7142

@mdiasribeiro
Copy link
Author

Yes, all http4s-based projects are using the same value to set the version. Perhaps one of the dependencies is pulling an older version? I'll investigate

@armanbilge
Copy link
Member

Do you have http4s-ember-server explicitly listed in your dependencies? Because based on the stack trace, you are definitely using it. So you should make sure to explicitly add it with the right version.

[info] 08:13:45.330 [main] ERROR Redirected from STDERR: [] 	at org.http4s.ember.server.internal.ServerHelpers$.send(ServerHelpers.scala:355) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants