Unity: DeleteFriendsAsync throws Error

Hi all,
I’m currently setting up my game with Nakama and its such a nice experience so far, but i stumbled upon a bug in the Unity SDK i guess.

I call the function DeleteFriendsAsync like in the example project “JollyRogers” and i get the following error:

NullReferenceException: Object reference not set to an instance of an object Nakama.UnityWebRequestAdapter+<SendRequest>d__11.MoveNext () (at Assets/External/Nakama/UnityWebRequestAdapter.cs:130) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

I also copied the example code from the docs(with my data), which throws the same error and its also not working in the example project “JollyRogers” for me.

My Setup:
Unity: 2018.4.16f1
Nakama Server: 2.4.1
Nakama SDK: 2.3.1

Should i create a git issue about it?

@DamarXCV I can’t reproduce this so far. Did you download the Unity client from the Asset Store releases or from GitHub?

I downloaded it from the asset store.
Did you tried to reproduce it with the sample project?
This is what i just tried again:

  1. Download the project from the repo
  2. Start the server under unity-sampleproject-master\ServerModules docker-compose -f docker-compose-postgres.yml up
  3. Open the MainScene.unity
  4. Build the project for desktop
  5. Add a Sufix to the NakamaSessionManagerSingleton
  6. Start the game in unity (user 1)
  7. Start the builded app (user 2)
  8. Add user 1 with user 2
  9. user 1 rejects the request and throws the error

I’m on windows but its also happening on android

I just replaced the Nakama SDK (v2.3.2) from the sample project with the nakama-unity repo (v2.4.0-dev) and its working.