Trouble with Connecting to PhotonChat Error ChatClient not implemented

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Photon Chat.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Trouble with Connecting to PhotonChat Error ChatClient not implemented

KayFi
2021-10-17 16:48:23

Hello, I have been struggling with photon chat specifically, with connecting to C# unity, it seems that I got hit with the error NotImplementedException in chatClient(param). Is there anyone who knows how to fix this or where I might do something wrong?

Thank you in Advance.

Comments

Tobias
2021-10-18 08:55:54

Help us help you. Let us know the full error message (with callstack).

Some Unity versions produces incorrect project files for VS and VS Code. Maybe that's related?

KayFi
2021-10-18 22:00:08

Hello, thank you for replying, @Tobias About the connection, I have managed to fix that it seems I may have connected the wrong id with the wrong pun version. But I still get stuck as It seems that IChatClientListener, some of it is just not implemented. And I still get this error even though I have tried to recreate the unity project. Any idea what's wrong?

NotImplementedException: The method or operation is not implemented.

ChatManager.OnGetMessages (System.String channelName, System.String[] senders, System.Object[] messages) (at Assets/Scripts/ChatManager.cs:103)

Photon.Chat.ChatClient.HandleChatMessagesEvent (ExitGames.Client.Photon.EventData eventData) (at Assets/Photon/PhotonChat/Code/ChatClient.cs:1270)

Photon.Chat.ChatClient.ExitGames.Client.Photon.IPhotonPeerListener.OnEvent (ExitGames.Client.Photon.EventData eventData) (at Assets/Photon/PhotonChat/Code/ChatClient.cs:974)

ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (ExitGames.Client.Photon.StreamBuffer stream) (at C:/Dev/photon-sdk-dotnet/PhotonDotNet/PeerBase.cs:898)

ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands () (at C:/Dev/photon-sdk-dotnet/PhotonDotNet/EnetPeer.cs:565)

ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at C:/Dev/photon-sdk-dotnet/PhotonDotNet/PhotonPeer.cs:1771)

Photon.Chat.ChatClient.Service () (at Assets/Photon/PhotonChat/Code/ChatClient.cs:347)

ChatManager.Update () (at Assets/Scripts/ChatManager.cs:47)

[Deleted User]
2021-10-18 22:49:37

IChatClientListener isn't supposed to have implementations, it's an interface. You're supposed to implement the functions yourself.

This is most likely an issue with your implementation of it as you can see at the top of the call stack. You probably forgot to remove one of the throw new NotImplementedException(); lines after automatically generating all of the functions for the interface.

If this isn't the problem, then more info is needed. Please post the code of your function ChatManager.OnGetMessages.

KayFi
2021-10-18 23:07:07

It's starting to get a little bit better but I got this as the display message instead of the Text in the InputField

b538c769-b7ce-447c-985f-d629766b7d31:

I assumed that there might still be something wrong with the publish text implementation. Is this correct?

KayFi
2021-10-18 23:11:28

But it seems like that, I have no idea how to fix this, any suggestion?

[Deleted User]
2021-10-18 23:15:52

We need to see the code, otherwise we cannot know. Please send how you're sending the display message and also how you're displaying it.

KayFi
2021-10-19 01:07:08

@MeepPun Hello, this is the code, that I am currently using for the message.

[Deleted User]
2021-10-19 01:26:21

Hi, that long string of numbers and letters before the colon are your UserID, that is the unique identifier for the user which sent the message. The sender does not include the nickname of the person who sent it unless you use the custom authentication service, which would replace the UserID with some other identifiable information.

As for the missing message, Debug.Log(currentChat); before it gets sent and check whether it actually has a value. Be sure that you are sending the correct text, I noticed you have chatField.text right under the line, is that related to anything? why is it being set to empty if it's not used?

KayFi
2021-10-19 02:07:31

It should erase the field after it is used, or else, the previous chat will be stuck In the UI. Is it possible because it doesn't recognize the string userID? I put DebugLog in the OnConnected method, but it seemed that the userID is empty. I try to put it on before Connecting as well it seems like it also empty.

KayFi
2021-10-19 02:21:12

I try to use a default user ID as well but it seems like it's not working as well and try to print it to before calling the user method and it somehow didn't print out as well

KayFi
2021-10-19 02:26:23

The code and the result. But I am not sure, is it because the userID is null?

KayFi
2021-10-19 02:43:17

I guess not. I try to declare it like this and the result is still the same

chatClient.Connect(PhotonNetwork.PhotonServerSettings.AppSettings.AppIdChat, PhotonNetwork.AppVersion, new AuthenticationValues("player1"));

KayFi
2021-10-19 02:53:17

This is partially unity part but it seems like it is because the userID is not properly identified.

at least there's a progress, now need to try to look what's wrong with unity.

Back to top