Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jeff
    @jeffersonzapata

    Hello, I getting this error when I'm sending two requests to the server within a second

    grpc[ERROR] SEVERE: Context was not attached when detaching
    grpc[ERROR] java.lang.Throwable
    grpc[ERROR]   at io.grpc.ThreadLocalContextStorage.detach(ThreadLocalContextStorage.java:48)
    grpc[ERROR]   at io.grpc.Context.detach(Context.java:411)
    grpc[ERROR]   at org.lyranthe.fs2_grpc.java_runtime.server.Fs2ServerCallListener.$anonfun$unsafeRun$4(Fs2ServerCallListener.scala:45)
    grpc[ERROR]   at monix.eval.internal.TaskRunLoop$.startFull(TaskRunLoop.scala:81)

    I'm using Task from Monix to start the server

    server <- NettyServerBuilder.forPort(config.grpc.port.number).addService(grpcServiceImpl).resource[F]

    Can you please help me to know what I'm missing ?

    Alex Henning Johannessen
    @ahjohannessen
    @jeffersonzapata That seems related to fiadliel/fs2-grpc#86 //cc @rossabaker
    Jeff
    @jeffersonzapata
    Thanks, I'm using the version 0.5.1
    Alex Henning Johannessen
    @ahjohannessen
    @jeffersonzapata Is it possible to try using cats.effect.IO instead in order to see if it has something to do with Monix.
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker I can reproduce the issue @jeffersonzapata is having with https://github.com/fiadliel/fs2-grpc-example (updated to 0.5.1), so the Context propagation addition seems like a regression.
    Alex Henning Johannessen
    @ahjohannessen
    Getting this:
    Sep 17, 2019 10:12:01 AM io.grpc.ThreadLocalContextStorage detach
    SEVERE: Context was not attached when detaching
    java.lang.Throwable
        at io.grpc.ThreadLocalContextStorage.detach(ThreadLocalContextStorage.java:48)
      | => sat io.grpc.Context.detach(Context.java:421)
      | => pat org.lyranthe.fs2_grpc.java_runtime.server.Fs2ServerCallListener.$anonfun$unsafeRun$4(Fs2ServerCallListener.scala:45)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:87)
        at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:355)
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:376)
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:316)
        at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:136)
        at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:355)
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:376)
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:316)
        at cats.effect.internals.Callback$AsyncIdempotentCallback.run(Callback.scala:131)
        at cats.effect.internals.Trampoline.cats$effect$internals$Trampoline$$immediateLoop(Trampoline.scala:70)
        at cats.effect.internals.Trampoline.startLoop(Trampoline.scala:36)
        at cats.effect.internals.TrampolineEC$JVMTrampoline.super$startLoop(TrampolineEC.scala:93)
        at cats.effect.internals.TrampolineEC$JVMTrampoline.$anonfun$startLoop$1(TrampolineEC.scala:93)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
        at cats.effect.internals.TrampolineEC$JVMTrampoline.startLoop(TrampolineEC.scala:93)
        at cats.effect.internals.Trampoline.execute(Trampoline.scala:43)
        at cats.effect.internals.TrampolineEC.execute(TrampolineEC.scala:44)
        at cats.effect.internals.Callback$AsyncIdempotentCallback.apply(Callback.scala:137)
        at cats.effect.internals.Callback$AsyncIdempotentCallback.apply(Callback.scala:124)
        at cats.effect.concurrent.Deferred$ConcurrentDeferred.$anonfun$unsafeRegister$1(Deferred.scala:205)
        at cats.effect.concurrent.Deferred$ConcurrentDeferred.$anonfun$unsafeRegister$1$adapted(Deferred.scala:205)
        at cats.effect.concurrent.Deferred$ConcurrentDeferred.$anonfun$notifyReadersLoop$1(Deferred.scala:241)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:87)
        at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:355)
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:376)
        at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:316)
        at cats.effect.internals.IOShift$Tick.run(IOShift.scala:36)
        at cats.effect.internals.PoolUtils$$anon$2$$anon$3.run(PoolUtils.scala:51)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    Alex Henning Johannessen
    @ahjohannessen
    @jeffersonzapata fiadliel/fs2-grpc#113 fixes the issue you are experiencing.
    Ross A. Baker
    @rossabaker
    0.5.2 is syncing with that now.
    Alex Henning Johannessen
    @ahjohannessen
    thanks a lot :+1:
    Jeff
    @jeffersonzapata
    @ahjohannessen thank you so much :thumbsup:
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker Can you please cut a new release :) There is a bugfix in ScalaPB 0.9.5 that I would like to get into a fs2-grpc release.
    Ross A. Baker
    @rossabaker
    @ahjohannessen Just published.
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker thanks buddy :)
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker @fiadliel Could you take a look fiadliel/fs2-grpc#136
    Ross A. Baker
    @rossabaker
    I had a rough week, but have a tab open to look tomorrow.
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker thanks :)
    Hans
    @lhohan-cb
    Hello,
    Are there any examples available to get started with this project? I am specifically looking on how to implement and use MyFs2Grpc[F[_], A] services.
    Alex Henning Johannessen
    @ahjohannessen
    @lhohan-cb Here is an example https://github.com/fiadliel/fs2-grpc-example
    A bit dated, I’ll see about getting that updated to latest
    Hans
    @lhohan-cb
    @ahjohannessen I'll try this. Thank you very much!
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker could you please publish a release? :)
    Ross A. Baker
    @rossabaker
    @ahjohannessen It's syncing now as 0.6.0.
    Alex Henning Johannessen
    @ahjohannessen
    Thanks @rossabaker :)
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker Please take a look at https://github.com/fiadliel/fs2-grpc/pull/166/files
    Nadav Samet
    @thesamet
    @ahjohannessen I left a few comments
    Alex Henning Johannessen
    @ahjohannessen
    @thesamet thanks, will take a look.
    Ross A. Baker
    @rossabaker
    0.7.0 is now available.
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker Can you please reach out to @fiadliel in order to get GitHub rights to add the missing variables?
    Seems like Gary is not very often online
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker could you please publish a 0.7.1 version?
    Ross A. Baker
    @rossabaker
    @ahjohannessen I should be able to get to that this afternoon.
    Ross A. Baker
    @rossabaker
    0.7.1 is syncing to Maven Central.
    Alex Henning Johannessen
    @ahjohannessen
    Thanks @rossabaker :)
    Alex Henning Johannessen
    @ahjohannessen
    Ross A. Baker
    @rossabaker
    Oh, wow, that's more than a Scala Steward. :tada: I will try to give it a good look tonight.
    Alex Henning Johannessen
    @ahjohannessen
    Also got a branch that cleans a bit up in code gen, in that most of generated methods are defined in terms of other generated methods.
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker I had to tweak tests a bit and it felt better to move to munit-cats-effect as well
    Ross A. Baker
    @rossabaker
    v0.8.0 is out
    Alex Henning Johannessen
    @ahjohannessen
    @rossabaker Could you please take a look at fiadliel/fs2-grpc#270
    Ross A. Baker
    @rossabaker
    0.9.0-M1 (Cats-Effect-2) and 1.0.0-M1 (Cats-Effect-3) are on their way to Maven Central.
    Alex Henning Johannessen
    @ahjohannessen
    :+1:
    Alexandre Bertails
    @betehess
    Hello! I am trying to understand how one can send the Status (see https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#responses) as part of the trailers. Is that something that should be customizable? I am no gRPC over HTTP2 expert but shouldn't be there by default? It currently breaks integration with other gRPC clients that are expecting the Status in the trailers.
    Mark Tomko
    @mtomko
    I'm playing around a bit with a client built with fs2-grpc, and I can't tell from the example code or the documentation whether I should treat the client calls as blocking. The example client app doesn't take any precautions about creating a blocking pool.
    The library overall seems great, I've been able to get up to speed very quickly and program against comfortable libraries and abstractions, so thanks!
    Mark Tomko
    @mtomko
    Also, in that client example, the managedChannel isn't shutdown, is that critical?
    Mark Tomko
    @mtomko
    ah, there's a .resource method, but I'm still not sure about the blocking
    Alex Henning Johannessen
    @ahjohannessen
    It is non-blocking :)
    Mark Tomko
    @mtomko
    Great. I assumed netty let you do that
    thanks!