Unexpected JSON payload found

net

(Jens) #1

Calling LoginService.Logout() (using JSON) throws an exception in the client application.
“Unexpected JSON payload found”

Logout using BIN or XMLRPC is working fine.

        try
        {
            ServerAccess.Instance.LoginService.Logout();
            Console.WriteLine("Logged out");
        }
        catch (Exception ex)
        {
            // "Unexpected JSON payload found"
            Console.WriteLine($"Logout Error: {ex.Message}");
        }

TestCase.zip (65.9 KB)


(antonk) #3

That’s actually a bug (and a really old one) - JSON serializer doesn’t work with methods that return no results.

You either need to set WrapResult on both client and server to true or to wait until next Beta release to get this fixed.

Or if that is really a showstopper for you I can create a build for you tomorrow.


(RemObjects) #4

Thanks, logged as bugs://81517


(RemObjects) #5

Thanks, logged as bugs://81518


(Jens) #6

Thank you. I’ll turn Logout() into a function with return value until it’s fixed. No hurry.


(RemObjects) #7

bugs://81517 got closed with status fixed.


(RemObjects) #8

bugs://81518 got closed with status nochangereq.