Peer::opAuthenticate is not triggered

edited November 2019 in Native
I have tried my code in a different application and the connection seems not to finish, I do not trigger connectReturn nor connectionError callbacks, the only thing that I have noticed is that with the logs, I can see that it stops before printing this message (took from the project where the connection works)

[SteamWrapper] 2019-11-13 17:28:43,331 INFO peer.cpp ExitGames::LoadBalancing::Peer::opAuthenticate() 155 OperationRequest - operationCode: 230 {211=true, 224="*app-id removed*", 220="1.0", 225="Test16587"}

instead I got The thread 0x6068 has exited with code -1 (0xffffffff). so it seems something went wrong but I can't catch any exception or something like that, I don't know if it gives you ideas ?


  • Kaiserludi
    Kaiserludi admin
    edited November 2019
    Hi @benjaml.

    Have you verified that you regularly call service() in that different application? You won't be able to connect and to receive connection related callbacks without doing so, nor will the connection-flow ever reach the authentication-state in which opAuthenticate() gets called, which prints the log output that you have copied from your working application.

    Note - the log message that you have included in your post contains your appID. Please never share your appID on public channels.
    You can share it with the people who work for Exit Games (the company behind photon engine) when communicating with them directly and you can of course share it with your coworkers who work on the same project, but you should not share it with the general public, as it might otherwise be found by someone with malicious intent who would identify his app as yours.

    I have edited your post to remove the appID.
  • Hi @Kaiserludi

    Thanks for removing the appID, I shall be more carefull in the futur, luckily it's just a test application nothing really dangerous.

    I do call regularly service. As I'm replacing Steam by Photon and Steam is already connected when the game launched, and I can't really modify all the code of the game to switch to Photon, I have make a Connect that will block the execution while it is not connected like this :
    std::thread t1([]
    	if (!instance)
    		instance = new PhotonListener();
    		if (!instance->is_connected)
    		while (!instance->is_connected)
    this is also from there that I seem to got the error message The thread 0x6068 has exited with code -1 (0xffffffff).. I did try to catch exceptions but I didn't catch anything. I don't know what's going on
  • Hi @benjaml.

    I assume you have put in a breakpoint to see that you actually hit those lines? Maybe its an unitialized variable issue that prevents the checks if instance or instance->is_connected is 0 to resolve to false?