question

Tom avatar image
Tom asked

(30/06/2021) PlayFab EdEx cannot login. (Caught an error:Invalid JSON string)

PlayFab Ed Ex logins are broken again. Could you please add it to your test plans, cheers.

9 comments
10 |1200

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

Good Guy avatar image Good Guy commented ·

Same here.
Unity 2018.4.36f1
PlayFab extension 2.104.210208

Last time this happened it was due to expired certificates on PF's side.

2 Likes 2 ·
trowju@gmail.com avatar image trowju@gmail.com commented ·

I'm also no longer able to login. The OnWwwError callback error for the login is a generic 500

1 Like 1 ·
Seth Du avatar image Seth Du ♦ commented ·

I cannot reproduce this issue in my testing environment. What is the version of extension? Have you tried to reinstall the latest version?

0 Likes 0 ·
Tom avatar image Tom Seth Du ♦ commented ·

Unity 2019.4.24f1
PlayFab SDK UnitySDK-2.104.210208

As previously reported here. (17/03/2021)

1 Like 1 ·
Ablegames avatar image Ablegames Seth Du ♦ commented ·

My Version is

Unity 2019.4.25f1

PlayFab SDK 2.104.210208

0 Likes 0 ·
dekkainasubi avatar image dekkainasubi commented ·

私もログインできないです。

0 Likes 0 ·
Ethan Glue avatar image Ethan Glue commented ·

I can reproduce this as well, it's a problem for me as well.

0 Likes 0 ·
Show more comments
Seth Du avatar image
Seth Du answered

Update: This issue has been fixed according to the team. Please retry the login in Unity. Let me know if there are any other questions.

2 comments
10 |1200

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

Ethan Glue avatar image Ethan Glue commented ·

Works now

0 Likes 0 ·
Good Guy avatar image Good Guy commented ·

@SethDu

Well, I can log in now, but my Console is spitting out thousands of warnings non-stop that say:

Could not save compressapidata because PlayFabSettings could not be found.

It does this if I select the "Settings" tab of the extension and then "Project". The "Compress API data" checkbox is not checked and will not allow me to check it on (it's basically not-clickable at all).

My settings ARE there though, displayed in the fields, so I don't know why it's complaining it can't find the settings.

0 Likes 0 ·
Derek avatar image
Derek answered

Same thing happen to me, on an existing project.

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.

Dominic Williamson avatar image Dominic Williamson commented ·

Me too as of July 3rd.

0 Likes 0 ·
hapygames avatar image
hapygames answered

I get these errors when trying to log in in my already existing project:

Note: The errors haven´t appeared in the SDK version before this one, they appeared after updating to the latest SDK version.

PlayFab EditorExtensions: Caught an error:Invalid JSON string UnityEngine.Debug:LogError (object) PlayFab.PfEditor.PlayFabEditor:StateUpdateHandler (PlayFab.PfEditor.PlayFabEditor/EdExStates,string,string) (at Assets/PlayFabEditorExtensions/Editor/PlayFabEditor.cs:332) PlayFab.PfEditor.PlayFabEditor:RaiseStateUpdate (PlayFab.PfEditor.PlayFabEditor/EdExStates,string,string) (at Assets/PlayFabEditorExtensions/Editor/PlayFabEditor.cs:247) PlayFab.PfEditor.PlayFabEditorHelper:SharedErrorCallback (PlayFab.PfEditor.EditorModels.PlayFabError) (at Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorHelper.cs:127) PlayFab.PfEditor.PlayFabEditorAuthenticate/<>c:<OnLoginButtonClicked>b__14_1 (PlayFab.PfEditor.EditorModels.PlayFabError) (at Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorAuthenticate.cs:299) PlayFab.PfEditor.PlayFabEditorHttp:OnWwwError (System.Action`1<PlayFab.PfEditor.EditorModels.PlayFabError>,string) (at Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs:130) PlayFab.PfEditor.PlayFabEditorHttp/<>c__DisplayClass2_0`2<PlayFab.PfEditor.EditorModels.LoginRequest, PlayFab.PfEditor.EditorModels.LoginResult>:<MakeApiCall>b__1 (string) (at Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs:95) PlayFab.PfEditor.PlayFabEditorHttp/<Post>d__7:MoveNext () (at Assets/PlayFabEditorExtensions/Editor/Scripts/PlayFabEditorSDK/PlayFabEditorHttp.cs:177) PlayFab.PfEditor.EditorCoroutine:Update () (at Assets/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.

hapygames avatar image
hapygames answered

I tried deleting the SDK and reinstalling it but it still didn´t work.

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.

Good Guy avatar image Good Guy commented ·

Don't bother. The problem is clearly on their end, sending back invalid data after a valid log-in attempt.

0 Likes 0 ·
Park Seok Sun avatar image
Park Seok Sun answered

We also do not log in as a developer login in the editor. Of course, this is an existing project. Unity is 2020.3.f1 and Playfab installs the old or newest one, but all can't log in with the same error message as everyone else.

,

Already serviced project can't log-in in Playfab editor setting. The Unity version is 2020.3.13f1 and the Playfab version has been updated to the latest version, but I cannot log in. The error message is the same as others written here.

10 |1200

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

Martin van Stein avatar image
Martin van Stein answered

Any idea when this gets resolved?


I am running Unity 2019.4.9f1

I am basically getting the same error, when I am try to login via the editor extension:
PlayFab EditorExtensions: Caught an error:Invalid JSON string

Clearly something has changed server side , as it had been working for weeks without a problem and I did not update anything (something I don't do in the middle of a project).

Also it seems this has happened a couple of times before in past years , so it must be a recurring issue and therefore a fairly straight forward solution to fix as from the google searches I have done, the issues are similar and therefore the cause and therefore solution most likely is similar too.

So pretty please fix this and don't do that thing that causes this issue to arise anymore :)

10 |1200

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

Seth Du avatar image
Seth Du answered

Update: I have submitted a report to the SDK team, and will keep this thread updated when there is feedback. Thanks for your understanding.

7 comments
10 |1200

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

Seth Du avatar image Seth Du ♦ commented ·

I notice that few developers have this issue on PlayFab extension 2.104.210208. The latest version of PlayFab Editor extension is 2.110.210618 and in my testing environment, it works fine.

May I ask does this issue occur in a fresh new project? It will be appreciated if you can share any Fiddler trace. Feel free to share the response of HTTP request to https://editor.playfabapi.com/DeveloperTools/User/Login. Please remember to hide username and password or any other confidential information.

To be clear, Unity PlayFab SDK and Unity PlayFab Extension are separate, extension is aimed at helping developers configure PlayFab environment, which is not compulsory for PlayFab SDK. I will dig into this issue, but if there is business impact caused by this issue, try to remove the extension, and use PlayFab SDK alone.

0 Likes 0 ·
Highbrow Dygital avatar image Highbrow Dygital Seth Du ♦ commented ·

This occurred in my existing project not a new one.

0 Likes 0 ·
Ethan Glue avatar image Ethan Glue Seth Du ♦ commented ·

New project for me (new meaning 2 days with absolutly no work done)

0 Likes 0 ·
Blue avatar image Blue Seth Du ♦ commented ·

My previous Project use under Extention version. but this error same.

So I make New Project and download new Extention version, but error again [PlayFab EditorExtensions: Caught an error:Invalid JSON string UnityEngine.Debug:LogError(Object)].

I use unity version 2019.4.17f1

I download version this link. https://github.com/PlayFab/UnitySDK

0 Likes 0 ·
Show more comments
Park Seok Sun avatar image
Park Seok Sun answered

You are now logged in normally. However, it does not work with the following message. As with previous use, all settings have been completed, but If you go back to the old SDK, it works, but if you install the latest, it doesn't work properly.

"Could not save compressapidata because PlayFabSettings could not be found."

6 comments
10 |1200

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

Seth Du avatar image Seth Du ♦ commented ·

When you switch to the latest version, have you navigated to [Unity toolbar] -> [PlayFab] -> [MakePlayFabSharedSettings] and click it.

In addition, will unchecking the option "compress API data" help in [PlayFab EdEx] -> [Settings] ->[Project]?

0 Likes 0 ·
Good Guy avatar image Good Guy Seth Du ♦ commented ·

Same here, and the shared settings DO exist. See my comment above in response to "Best Answer"

0 Likes 0 ·
Park Seok Sun avatar image Park Seok Sun Seth Du ♦ commented ·

I did everything mentioned. But I keep getting the same error. I'm currently using it normally by going back to the previous version. But when I update it back to the latest version, I get the same error.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ commented ·

Hi, @Park Seok Sun @Evil Twin. We have reproduced this issue and digging into it a bit, the root cause has been located.

The current behavior is that the latest SDK is not compatible with the extension that you downloaded from document page. Using the latest version may solve, but you may also replace the line 22 in PlayFabEditorDataService.cs with the blow code:

public bool CompressApiData = false;

Compared between the latest 2 commits in source code, the CompressAPIData feature is deprecated while the extension hasn't got this update in 2.67, which results in a reference error.

The latest extension version is 2.110, please find it at Release UnitySDK version 2.110 PlayFab/UnitySDK (github.com)

I will submit a report to the team and hopefully this document issue should be fixed soon.

0 Likes 0 ·
Park Seok Sun avatar image Park Seok Sun Seth Du ♦ commented ·

I'm really glad to see a solution.

It was confirmed that the recommended method works normally when modified.

I'll wait for the updated version with the fix.

Thank you for your kindness.

1 Like 1 ·
Seth Du avatar image Seth Du ♦ Park Seok Sun commented ·

PlayFab already released an updated version. Meanwhile due to the redirecting issue in the document page, it only provides 2.67, and this also happens when clicking "upgrade extension" in Help page of extension.

I suggest removing the extension folder and import the latest version from the link I posted above.

0 Likes 0 ·

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.