question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Null returns and null parameters works in v4.5.2 but not in v5 anymore?

See original GitHub issue

Hi,

Thank you for this great library!

We’ve recently updated to v5.0.2 and noticed two breaking changes, causing us to roll back to v4.5.2:

Please see this minimal reproducible example: https://github.com/Kobus-Smit/MagicOnion5-ReturnNull

  1. Exception is thrown when a method returns null

    Client:

    Grpc.Core.RpcException: Status(StatusCode="Cancelled", Detail="No message returned from method.")
       at MagicOnion.UnaryResult`1.UnwrapResponse()
    

    Server:

    Grpc.AspNetCore.Server.ServerCallHandler[7]
          Error status code 'Cancelled' with detail 'No message returned from method.' raised.
    
  2. Exception is thrown when a method contains a null parameter

    Client:

    Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Incomplete message.")
       at MagicOnion.Client.ResponseContext`1.UnboxResponseAsync(AsyncUnaryCall`1 boxed)
       at MagicOnion.UnaryResult`1.UnwrapResponse()
    

    Server:

    Grpc.AspNetCore.Server.ServerCallHandler[14]
          Error reading message.
          Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Incomplete message.")
             at Grpc.AspNetCore.Server.Internal.PipeExtensions.ReadSingleMessageAsync[T](PipeReader input, HttpContextServerCallContext serverCallContext, Func`2 deserializer)
    Grpc.AspNetCore.Server.ServerCallHandler[7]
          Error status code 'Internal' with detail 'Incomplete message.' raised.
    

If you change the example to v4.5.2 it works without any errors.

Any ideas or workarounds?

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mayukicommented, Jan 27, 2023

We have released a version that fixes this problem. Your report was very helpful! Thank you!

1reaction
mayukicommented, Jan 26, 2023

Sorry for the delay in responding. Thank you for the detailed information! We will reproduce and investigate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to match a possible null parameter in Mockito
I'm trying to verify that the class I'm testing calls the correct dependency class's method. So I'm trying to match the method parameters,...
Read more >
ArgumentMatchers (Mockito 5.4.0 API)
Since Mockito 2.1.0, only allow non-null instance of , thus null is not anymore a valid value. As reference are nullable, the suggested ......
Read more >
ArgumentMatchers (Mockito 2.2.9 API) - javadoc.io
Matcher methods like anyObject() , eq() do not return matchers. Internally, they record a matcher on a stack and return a dummy value...
Read more >
Differences between Windows PowerShell 5.1 and ...
This article summarizes the differences and breaking changes from Windows PowerShell 5.1 and the current version of PowerShell that is based ...
Read more >
Microsoft Teams PowerShell Release Notes
Learn about the latest changes in Teams PowerShell.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found