Build shared library successfully but when run examples not successfully
Here is printed error message I get when run all examples, from (basic_client, basic_server) to (test_client, test_server) Failed to set default AuthToken: ReturnValue(Generic error: "Disconnected from server") I seen the user and pass is the same at client and server, but cannot figure out how these errores related to authentication token
The default auth token is used when there's no authentication set up, so the error is a bit misleading. It looks like the server is dropping the connection while it's being established. There code that returns the error can be found here: https://github.com/brendan0powers/QtRpc2/blob/d7669d70a0cf6d72583d2173aaeb83bcac71f589/lib/clientproxy.cpp#L375
Are there any errors printed from the server?
I run basic_server then run basic_client, after that basic_client is terminated, basic_server show some errors: server listen on port 10123 Trying to construct an instance of an invalid type, type id: 6422639 Trying to construct an instance of an invalid type, type id: 788556800 Trying to construct an instance of an invalid type, type id: 65536 Trying to construct an instance of an invalid type, type id: 4259957 Trying to construct an instance of an invalid type, type id: 872441856 Trying to construct an instance of an invalid type, type id: 7274603 Trying to construct an instance of an invalid type, type id: 620785152 Trying to construct an instance of an invalid type, type id: 65536 Trying to construct an instance of an invalid type, type id: 290550866 Trying to construct an instance of an invalid type, type id: 591018561 Trying to construct an instance of an invalid type, type id: 879252591 Trying to construct an instance of an invalid type, type id: 627965952 Trying to construct an instance of an invalid type, type id: 256 Trying to construct an instance of an invalid type, type id: 917619 Trying to construct an instance of an invalid type, type id: 620786176 Trying to construct an instance of an invalid type, type id: 6881379 Trying to construct an instance of an invalid type, type id: 620756992 Trying to construct an instance of an invalid type, type id: 5046393 Trying to construct an instance of an invalid type, type id: 318792960 Trying to construct an instance of an invalid type, type id: 5308499 Trying to construct an instance of an invalid type, type id: 872444416 Trying to construct an instance of an invalid type, type id: 7209063 Trying to construct an instance of an invalid type, type id: 256 Trying to construct an instance of an invalid type, type id: 655360 Trying to construct an instance of an invalid type, type id: 1179725 Trying to construct an instance of an invalid type, type id: 956322560 Trying to construct an instance of an invalid type, type id: 7471222 Trying to construct an instance of an invalid type, type id: 687891200
Hmm, there's certainly something not set up correctly. It looks like the server might be getting bad data somehow. What version of Qt are you using?
I used Qt 5.11.0 and visual studio 2019, Cmake 3.19