QtRpc2 icon indicating copy to clipboard operation
QtRpc2 copied to clipboard

Build shared library successfully but when run examples not successfully

Open quanpm4900 opened this issue 4 years ago • 4 comments

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

quanpm4900 avatar Nov 29 '21 08:11 quanpm4900

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?

emmapowers avatar Nov 30 '21 13:11 emmapowers

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

quanpm4900 avatar Dec 01 '21 03:12 quanpm4900

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?

emmapowers avatar Jan 01 '22 22:01 emmapowers

I used Qt 5.11.0 and visual studio 2019, Cmake 3.19

quanpm4900 avatar Jan 09 '22 06:01 quanpm4900