If we enable isTestMode then it will work.
Below is the code we use for initialization, our access token is generated by our server.
VivoxConfigurationOptions options = new VivoxConfigurationOptions();
#if UNITY_IOS && !UNITY_EDITOR
options.SkipPrepareForVivox = true;
#endif
InitializationOptions initializationOptions = new InitializationOptions();
// _key can be excluded from SetVivoxCredentials if an implementation of IVivoxTokenProvider has been provided to the SDK.
await UnityServices.InitializeAsync();
VivoxService.Instance.SetTokenProvider(new VivoxVoiceTokenProvider());
await VivoxService.Instance.InitializeAsync(options);
Were there any other changes along the way when upgrading to v16.0.1 of the Vivox package?
Did anything about which credentials you are using change? Which Vivox server are you generating tokens for?
If it’s not mtu1xp (the default provided when creating a project on the Unity Dashboard), can you try placing them inside of initializationOptions.SetVivoxCredentials() like so initializationOptions.SetVivoxCredentials(_server, _domain, _issuer);
and passing the initializationOptions object into await UnityServices.InitializeAsync(); like await UnityServices.InitializeAsync(initializationOptions);
The reason why isTestMode may be working is likely because, when it’s toggled, the SDK will generate client-side tokens for you and use those for login and join channel requests.
We also migrate to Unity Dashboard when upgrading. So the credentials changed (the domain is still mtu1xp). Sorry for forgetting to mention that.
We already updated the new credentials on our server.
We also tried initializationOptions.SetVivoxCredentials like you suggested but still receive error code 20127
Hi heliosmini. This is Kevin from Unity Support. I wanted to follow up on your situation.
Could you please confirm if this login issue starting with your upgrade to v16.0.1 is still occurring: are you still getting 20127 errors in response to every Vivox login request? In other words, no logins succeed at all, and each one fails with 20127?
This next part is going to sound dumb—and is probably a moot point now that it’s a week later—but did you try closing and reopening the Unity Editor after upgrading the package and swapping the credentials? I’ve seen bad behaviour like this occasionally when making big changes to the local Vivox setup (package upgrade, linking new uDash project) when trying to hit the Play button without first closing and reopening the Editor window. You’ve probably done that by now.
If this is still happening, please let us know if it’s consistent with every login call.
Thank you for following up; no problem about the break. It’s great to hear you were able to resolve the issue by regenerating the Library folder! When updating packages, sometimes regenerating the auto-generated files like this can be necessary if some of the old package data is still cached locally, in order to prevent unexplained or unpredictable behaviour.
I will let the Vivox SDK team know what happened so they can determine if there’s anything we can do to defend against this, or provide a clearer error message. Thank you again for the report!