Parameter name null when new Account()

hello

I was using vivox without any error
but today suddenly i got this error when setting new Account(displayname);
and I can’t login.

ArgumentNullException: Value cannot be null.
Parameter name: name
VivoxUnity.AccountId..ctor (System.String issuer, System.String name, System.String domain, System.String displayname, System.String[] spokenLanguages, System.String environmentId) (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/VivoxUnity/AccountId.cs:75)
Unity.Services.Vivox.Account..ctor (System.String displayname, System.String[] spokenLanguages) (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/Account.cs:9)
VivoxVoiceManager.Login (System.String displayName) (at Assets/Samples/Vivox/15.1.180000-pre.1/Chat Channel Sample/Assets/ChatChannelSample/Scripts/Vivox/VivoxVoiceManager.cs:198)
RoomManager.OnSceneLoaded (UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode loadSceneMode) (at Assets/Scripts/RoomManager.cs:102)
UnityEngine.SceneManagement.SceneManager.Internal_SceneLoaded (UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode mode) (at <4746c126b0b54f3b834845974d1a9190>:0)

in Account.cs

VivoxService.Instance.PlayerId ?? Guid.NewGuid().ToString(),

reason is VivoxServece.Instance.PlayerId is not null but empty
so name dosen’t set correctly

I can’t find who set the PlayerId

I just changed editor version 3.12 to 3.16 and didn’t change script
Changed back to 3.12 but error was same

new vivox sample project in 3.16 works fine and has PlayerId

Please help.

Hello,
Is it working for you? we were facing issues with the Android, new version is not working fine Vivox 1.9.Lemme know if u figured this,tq.
Regards,
Chandu.

No still struggling.

If I set credentials(server, domain, issuer, key) directly in script It works on editor and some device,
but some device dosen’t work and get Parameter name Null error.

If I get credentials from await AuthenticationService.Instance.SignInAnomymouslyAsync(),
I get Parameter AccessToken null error because fail on authenticate vivox service initialize.

Hi,
Try this version “15.1.180001-pre.5”

Deleting Library folder dosen’t work so I exported entire package and imported to new project
and it’s working now.
I was too lazy to test changed version but thank you:)

1 Like

Changing version fixed my issue which is different.
Thanks @chanddu !

there is a bug in com.unity.services.vivox@15.1.180000-pre.1\Runtime\Account.cs

            base
            (
                VivoxService.Instance.Issuer,
                VivoxService.Instance.PlayerId ?? Guid.NewGuid().ToString(),
                VivoxService.Instance.Domain,
                displayname,
                spokenLanguages,
                VivoxService.Instance.EnvironmentId
            )

replace with

            base
            (
                VivoxService.Instance.Issuer,
                string.IsNullOrEmpty(VivoxService.Instance.PlayerId) ? Guid.NewGuid().ToString() : VivoxService.Instance.PlayerId,
                VivoxService.Instance.Domain,
                displayname,
                spokenLanguages,
                VivoxService.Instance.EnvironmentId
            )

you will need to make containing folder writable before change…

1 Like

Wow I didn’t know I can change to writable. Thank’s for the tip!