Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentException: JSON parse error: The document root must not follow by other values. #38

Open
Zeon8 opened this issue Jun 2, 2019 · 2 comments

Comments

@Zeon8
Copy link

Zeon8 commented Jun 2, 2019

I paste code from wiki https://github.com/nhn/socket.io-client-unity3d/wiki/Sample#2-acks-message and run nodejs server and run unity client and in log this error:
ArgumentException: JSON parse error: The document root must not follow by other values.
UnityEngine.JsonUtility.FromJson (System.String json, System.Type type) (at C:/buildslave/unity/build/Modules/JSONSerialize/Public/JsonUtility.bindings.cs:50)
UnityEngine.JsonUtility.FromJson[T] (System.String json) (at C:/buildslave/unity/build/Modules/JSONSerialize/Public/JsonUtility.bindings.cs:33)
socket.io.SocketInitializer+d__21.MoveNext () (at Assets/Plugins/socket.io/SocketInitializer.cs:138)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17

My Laptop:
Intel Pentium 2020m
4 GB RAM
Intel® HD Graphics for 3rd Generation Intel® Processors

@sandichhuu
Copy link

Hi, i'm also face this error.
Here is my way to fix this:

image

@iglikoxha
Copy link

You should use an older version of socket.io specifically 1.7.4 the latest 1.x version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants