- Home /
Fabric (Crashlytics) for unity 2017
Somebody installed carashlytics on Unity 2017? I can't login... And install the plugins.
Getting this error when try to login:
[Fabric] An exception has occured; Error writing request: The authentication or decryption has failed. UnityEngine.Debug:LogWarning(Object) Fabric.Internal.Editor.Utils:Warn(String, Object[]) (at Assets/Fabric/Editor/FabricUtils.cs:18) Fabric.Internal.Editor.Controller.PluginController:OnLoginError(Exception, Action`1) (at Assets/Fabric/Editor/GUI/Controller/PluginController.cs:537) Fabric.Internal.Editor.Controller.c_AnonStorey6:<>m0(Exception) (at Assets/Fabric/Editor/GUI/Controller/PluginController.cs:564) Fabric.Internal.Editor.Detail.c_Iterator0:MoveNext() (at Assets/Fabric/Editor/GUI/Detail/AsyncTaskRunner.cs:106) Fabric.Internal.Editor.Detail.AsyncTaskRunner`1:Update() (at Assets/Fabric/Editor/GUI/Detail/AsyncTaskRunner.cs:143) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Also debug the code. The error start to appear after this:
namespace Fabric.Internal.Editor.Net.OAuth {
public sealed class Client
{
public Token Get (string username, string password)
{
HttpWebRequest request = PrepareRequest (
URI + TokenEndpoint + DefaultScopeQuery
);
using (Stream stream = request.GetRequestStream ()) {
string entity = ComposeEntity (username, password, AppId, Secret);
byte[] bytes = Encoding.UTF8.GetBytes (entity.ToString ());
stream.Write (bytes, 0, bytes.Length); // <------ here
}
using (Stream stream = request.GetResponse ().GetResponseStream ()) {
return fromStream (stream);
}
}
Answer by Gooren · Sep 26, 2017 at 09:52 PM
I found a temporary fix:
Go to Fabric/Editor/GUI/Net/OAuth/Client.cs
Insert this "ServicePointManager.ServerCertificateValidationCallback += (o, certificate, chain, errors) => true;" line of code to the top of the 'PrepareRequest' method
Go to Fabric/Editor/Update/TimeoutWebClient.cs
Insert same line as in point (2) to the top of the 'GetWebRequest' method
Profit
Optional: use something like a '#warning Temporary quick fix!' so that you don't leave it there.
I got in touch with Tech Support -- It seems like it's a bug with the UnityPackage release on their website. (In theory it's solved now, with the current version listed for download)
Your answer