UnityWebRequest SSL CA Certificate Error

Hello, first of all I would like to say that I have already tried a lot of the code that is in the forum, otherwise I would not be writing.

In my case we have a game that uses UnityWebRequest, and recently we had to update from 2019.4.28 to 2020.3.38, because Google asked us to update the new Billing and we had no choice, we don’t like having to update due to bad experiences, and that it always lowers the performance of the game when we do it.

Well, I have a player (I don’t know if there will be more, but we’ve only received one), who has gone from having the UnityWebRequest work to not working(so in 2019 its working and in 2020 not working). Basically it is the first request that is made of the game to know if the player has the version that he plays and send it to the store if he needs it.

We have tried different things, forcing the certificate to be accepted, renewing our certificate, adding in the manifest that the site is trusted… And nothing has worked. This user has a Samsung Galaxy Cricket (which are the A, he has not been able to specify)

I add some code:

WWWForm form = new WWWForm();

form.AddField("version", app_version);
form.AddField("platform", platform);

UnityWebRequest w = UnityWebRequest.Post(URL + "initcode.php", form);

yield return w.SendWebRequest();

if (!string.IsNullOrEmpty(w.error))
{
   //The code enters here
} else
{

}

Hello? Some help? It would be good since we have been paying for years, if at least someone from support answered me.

This error means the server is not trusted. Probably root certificate is not in device certificate store.
The way around it is to connect custom certificate handler and manually validate the server.

Thanks for the answer. Do you have any example code? Because we already tried that, and it didn’t work for us, so it’s either the solution or we didn’t implement it well. Oh and the certificate we use is the one from Amazon. The thing is that with the 2019 version there were no problems.

Hello? A little more support please from the Unity experts, we have been paying for this engine for 4 years, without asking for anything and one day you have a serious error because of the engine and you don’t answer me. We have tried everything possible within the forum and it has not worked. The error arose from upgrading from Unity 2019.4.28 to Unity 2020.3.38.

If it does work with 2019.4, but not with later Unity, please make a small project to reproduce it and report a bug for it. We have to look inside what’s going on.

Hello, thanks for answering, we have prepared a project with the code, and a small canvas that tells you if it works or not. There is an Android build done inside as well. TestUnityWebRequest_2022_09_10_27.zip - Google Drive

Could you report it as bug using Unity Editor, so it goes the proper channel?
Thanks.

Great!Thanks, Reported, we waiting for response!

Hello! I update the post to comment that rolling back to version 2020.3.28 works correctly, quite sure it is this point that causes “Core: Updated libcurl to 7.80” to fail. We are obliged to stay in this version but could it solve the problem for future updates?

That’s one possibility. Have you tried the latest version, cause I think we had upgraded curl even further.

We tried version 2020.3.40 and it didn’t work. I confirm that with wifi it works but with data it does not. And with version 2020.3.28 it works correctly.

Hello, we already have the bug fixed for a few weeks by going down to 2020.3.28, but I would like to know if there is a forecast that it will be fixed in future versions. also send the error