Failed to call function OnCustomAuthenticationResponse of ...
I am using PUN V1.6 . I use self hosting which for I use Photon version 4.0.28 . Everything works but I get errors in console for any class that I inherit from Photon.PunBehaviour . The error is this :
Failed to call function OnCustomAuthenticationResponse of class RealTimeNetworkManager
Calling function OnCustomAuthenticationResponse with no parameters but the function requires 1.
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
NetworkingPeer:SendMonoMessage(PhotonNetworkingMessage, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2113)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1261)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)
this is my current config for server:
Note that if I set Enabled=false , I get another errors:
The appId this client sent is unknown on the server (Cloud). Check settings. If using the Cloud, check account.
Failed to connect to server: InvalidAuthentication
and nothing works anymore. I don't want to use custom authentication. Can you please guide me how can I solve this issue?
Thanks in advance
Comments
-
Opps current config:prince_of_persia said:Hello .
I am using PUN V1.6 . I use self hosting which for I use Photon version 4.0.28 . Everything works but I get errors in console for any class that I inherit from Photon.PunBehaviour . The error is this :
Failed to call function OnCustomAuthenticationResponse of class RealTimeNetworkManager
Calling function OnCustomAuthenticationResponse with no parameters but the function requires 1.
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
NetworkingPeer:SendMonoMessage(PhotonNetworkingMessage, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2113)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1261)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)
this is my current config for server:
Note that if I set Enabled=false , I get another errors:
The appId this client sent is unknown on the server (Cloud). Check settings. If using the Cloud, check account.
Failed to connect to server: InvalidAuthentication
and nothing works anymore. I don't want to use custom authentication. Can you please guide me how can I solve this issue?
Thanks in advance
<AuthSettings Enabled="true" ClientAuthenticationAllowAnonymous="true">
</AuthSettings>0 -
Hi @prince_of_persia,
You can safely disable or remove custom authentication if you don't need it.
Please make sure to select proper PUN settings from PhotonServerSettings inspector, set "Hosting" option to "Self Hosted" from dropdown list and set "Server Address" (e.g. 127.0.0.1) and "Server Port" (e.g. 5055).1 -
From the server setting ? I deleted it from the config file and Now I get the same error as I have disabled it:JohnTube said:Hi @prince_of_persia,
You can safely disable or remove custom authentication if you don't need it.
Please make sure to select proper PUN settings from PhotonServerSettings inspector, set "Hosting" option to "Self Hosted" from dropdown list and set "Server Address" (e.g. 127.0.0.1) and "Server Port" (e.g. 5055).
The appId this client sent is unknown on the server (Cloud). Check settings. If using the Cloud, check account.
Failed to connect to server: InvalidAuthentication
My Ip an Port settings are correct I Connect to the server and after few seconds I get this error and disconnect from the server.0 -
You get the error:
Failed to call function OnCustomAuthenticationResponse of class RealTimeNetworkManager
Check if you implemented a method OnCustomAuthenticationResponse and if it has the required parameter (Dictionary data).
Calling function OnCustomAuthenticationResponse with no parameters but the function requires 1.
That should solve the exception issue.
I will ask Hamza to post the exact setting to turn off custom auth on your server instance.
0 -
Hey @prince_of_persia,
We received your support ticket regarding this, replied and we are now waiting for your email. But we can always sort things out here on the forum which is better for everyone.
What I understand from your situation is that you are using PUN to connect to a self hosted Photon Server (v4) but:
1. If you keep default included Custom Authentication example configuration untouched:
You get this error:Failed to call function OnCustomAuthenticationResponse of class RealTimeNetworkManager
Possible explanation:
Calling function OnCustomAuthenticationResponse with no parameters but the function requires 1.
You changed the configuration to use a different endpoint URL or the default one is failing somehow. We should investigate this and fix any eventual issue. But this is not relevant to you since you do not require custom authentication.
2. If you disable or remove Custom Authentication configuration (as explained here):
You get this error:The appId this client sent is unknown on the server (Cloud). Check settings. If using the Cloud, check account. Failed to connect to server: InvalidAuthentication.
Possible explanation:
PUN client is trying to connect to Photon Cloud without a proper AppID. Please double check yourPhotonServerConfiguration
or send us a screenshot by email. Or which is less probable, you have made changes in the LoadBalancing application source code.
0 -
Check if you implemented a method OnCustomAuthenticationResponse and if it has the required parameter (Dictionary data).Tobias said:You get the error:
Failed to call function OnCustomAuthenticationResponse of class RealTimeNetworkManager
Calling function OnCustomAuthenticationResponse with no parameters but the function requires 1.
That should solve the exception issue.
I will ask Hamza to post the exact setting to turn off custom auth on your server instance.
I used PunBehaviour class as the super class and I did not override OnCustomAuthenticationResponse so I don't think there is something wrong with this.0 -
Hi @JohnTube ,
I responded to the email . But to share things here:
1) I did not touch the source code for server
2) I left the AppId field empty as you suggested in the email but still no progress
3) We have gotten these errors since we updated our server version from v3 to v4. If I understood correctly custom authentication was added to the photon server v4 so I think there is something wrong with this.
Thanks0