question

allenofadams avatar image
allenofadams asked

Unity "EditorExtension: Caught and error Invalid JSON string" when trying to log in.

Just as the title says, it happens when I press the login button in the editor window.

The project has been synced from github onto another machine, however, I've tried removing the playfab folders and redownloading them. It still gave me the same error.

unity3d
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1807605288 avatar image
1807605288 answered

Hello, due to a piece of bad code on our side, the log that you're showing isn't very helpful.

I have fixed that particular error so it should log properly.

I would like you to update to our test build which I just made available:

https://github.com/PlayFab/UnityEditorExtensions/raw/automated/Packages/PlayFabEditorExtensions.unitypackage

Please reload the above Ed Ex package, and send us a new exception log.

Sorry for the mess.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1807605288 avatar image 1807605288 ♦ commented ·

@allenofadams I'll need an update from you before I can proceed with the second part of this fix. Please let me know when you have another error-trace for me.

Thanks

0 Likes 0 ·
marcowilliamspf avatar image
marcowilliamspf answered

@allenofadams, I'm sorry you are having this issue. However, we need more information as to why this is happening for you.

Please post the entire stacktrace of the error. The stacktrace should be available in the unity editors console. More importantly we need the line numbers of where the error is thrown so that we can track down the issue and see what is happening.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

allenofadams avatar image allenofadams commented ·

Here's an image, it's very vague, I went into your code and tried to have a look for my self but couldn't find anything.

A possible answer is that PlayFab requests might be getting blocked by a firewall. However I figure the error would be a little more clear if that was the case.

0 Likes 0 ·
capture.png (38.1 KiB)
katiepearce avatar image
katiepearce answered

This is an old thread but I'm having the same issue. I'm deliberately trying to log in when not connected to the internet so I can handle that failure.

This error is preventing me from receiving the event from a failed login

Two Errors;
EditorExtensions: Caught an error:Invalid JSON string UnityEngine.Debug:LogError(Object) PlayFab.PfEditor.PlayFabEditor:StateUpdateHandler(EdExStates, String, String) (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/PlayFabEditor.cs:332) PlayFab.PfEditor.PlayFabEditor:RaiseStateUpdate(EdExStates, String, String) (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/PlayFabEditor.cs:247) PlayFab.PfEditor.PlayFabEditorHelper:SharedErrorCallback(PlayFabError) (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorHelper.cs:128) PlayFab.PfEditor.PlayFabEditorHttp:OnWwwError(Action`1, String) (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs:130) PlayFab.PfEditor.<>c__DisplayClass2_0`2:<MakeApiCall>b__1(String) (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs:95) PlayFab.PfEditor.<Post>d__7:MoveNext() (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs:177) PlayFab.PfEditor.EditorCoroutine:Update() (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/Scripts/Utils/EditorCoroutine.cs:103) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

PlayFab EditorExtensions: Caught an error:SharedErrorCallbackCannot resolve destination host UnityEngine.Debug:LogError(Object) PlayFab.PfEditor.PlayFabEditor:StateUpdateHandler(EdExStates, String, String) (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/PlayFabEditor.cs:332) PlayFab.PfEditor.PlayFabEditor:RaiseStateUpdate(EdExStates, String, String) (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/PlayFabEditor.cs:247) PlayFab.PfEditor.PlayFabEditorHelper:SharedErrorCallback(String) (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorHelper.cs:133) PlayFab.PfEditor.<Post>d__7:MoveNext() (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs:177) PlayFab.PfEditor.EditorCoroutine:Update() (at Assets/Plugins/ShivaCode/Editor/PlayFabEditorExtensions/Editor/Scripts/Utils/EditorCoroutine.cs:103) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hugo Deziel avatar image
Hugo Deziel answered

Hi,

I am also having this issue, I'm using Unity 2019.3.14f1 and PlayFab SDK 2.90.200713.

The error appears at 2 different moments, the first one happens sometimes when I login with the EdEx and the other moment is sometimes when I login with a player account in my game.

Error log:

EditorExtensions: Caught an error:Invalid JSON string

Curl error 51: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_CN_MISMATCH

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.