Hi,
We are migrating our project from Unity 5.5 to Unity 2017.3, but now we are getting login errors with PlayFab in the Unity Console.
WebException: Error writing request: The authentication or decryption has failed. System.Net.WebConnectionStream.WriteHeaders () System.Net.WebConnectionStream.SetHeaders (System.Byte[] buffer)(wrapper remoting-invoke-with-check) System.Net.WebConnectionStream:SetHeaders (byte[]) System.Net.HttpWebRequest.SendRequestHeaders (Boolean propagate_error) Rethrow as WebException: Error: SendFailure (Error writing request: The authentication or decryption has failed.) System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) System.Net.HttpWebRequest.GetRequestStream () PlayFab.Internal.PlayFabWebRequest.Post (PlayFab.Internal.CallRequestContainer reqContainer) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:189) Rethrow as WebException: SendFailure: WebException making http request to: https://8FF3.playfabapi.com/Client/LoginWithCustomIDUnityEngine.Debug:LogException(Exception) PlayFab.Internal.PlayFabWebRequest:Post(CallRequestContainer) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:202) PlayFab.Internal.PlayFabWebRequest:WorkerThreadMainLoop() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:122)
SendFailure: WebException making http request to: https://8FF3.playfabapi.com/Client/LoginWithCustomID UnityEngine.Debug:LogError(Object) PlayFabLogin:OnLoginFailure(PlayFabError) (at Assets/PlayFabLogin.cs:22) PlayFab.Internal.<QueueRequestError>c__AnonStorey0:<>m__0() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:265) PlayFab.Internal.PlayFabWebRequest:Update() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWebRequest.cs:346) PlayFab.Internal.PlayFabHttp:Update() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs:279)
PlayFab SDK plugin version is 2.34.180102 and our code is the same in both Unity versions.
The PlayfabSharedSettings asset is correctly configured (using the PlayFab Editor Extension) and using Request Type "Http Web Request" as before.
We tested in a dumb project in Unity 2017.3, only with the PlayFab plugin and using the same script as the "Unity Get Started" tutorial. Same errors on login.
I read here about the WWW regressions on the Unity 2017 versions, and you recomend to use HttpWebRequest (with no compression) but the thing is that we are already using HttpWebRequest.
Thank you
On Unity 5.6.1p4 error too. And in Safari (iOS), open playfabapi site - worning certificate. For Editor and Android - all ok
Answer by 1807605288 · Jan 16, 2018 at 10:55 PM
The cause of the issue you're seeing is due to poor testing on our side.
We discovered a security vulnerability with our HttpWebRequest solution, and attempted to patch it.
https://github.com/PlayFab/SDKGenerator/commit/caac06b86d76acd3113bb6eb82ce0df94e910842
Unfortunately, it wasn't properly tested, and it turns out that HttpWebRequest no longer accepts ANY TLS certificate, including our own.
I've spent the last hour on stack overflow looking into this issue, and there does not seem to be any obvious correct solution (I attempted several answers that seemed promising, but they didn't solve the problem).
What can you do:
I apologize for this mess up. We will endeavor to improve our automated testing in this category, but for now, we don't have a "good" solution for you if you're using HttpWebRequest.
Hi Paul,
Thanks for your answer.
For now, we are delaying our migration to Unity 2017.3. Too many problems when building on the game, weird crashes and little time to solve it... (not related to PlayFab plugin)
When we take it back, we will check your solutions or maybe a new plugin version update will be available.
Thanks again
Marc
Unity Download Content from CDN before Log-in,Download content with CDN before login 1 Answer
OAuth consent screen and Playfab: Can't verify because I don't own playfab.com domain 3 Answers
Catalog's Item Custom Data 1 Answer
What happened to the OneSignal addon? (having iOS push errors with PlayFab) 1 Answer