Header value contains invalid characters

0 votes

Everything was working fine with very thin code, but it suddenly stopped working and issued the message: Header value contains invalid characters.

InvalidOperationException: Header value contains invalid characters

UnityEngine.Networking.UnityWebRequest.SetRequestHeader (System.String name, System.String value) (at C:/buildslave/unity/build/Modules/UnityWebRequest/Public/UnityWebRequest.bindings.cs:514)
UnityEngine.WWW..ctor (System.String url, System.Byte[] postData, System.Collections.Generic.Dictionary`2[TKey,TValue] headers) (at C:/buildslave/unity/build/Modules/UnityWebRequestWWW/Public/WWW.cs:111)
com.shephertz.app42.paas.sdk.csharp.connection.RESTConnectorWWW+<Execute>d__6.MoveNext () (at <85575a1ab73c4d6e95c6bfeaefc8478d>:0)
com.shephertz.app42.paas.sdk.csharp.connection.RESTConnectorWWW+<WaitForRequest>d__3.MoveNext () (at <85575a1ab73c4d6e95c6bfeaefc8478d>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
com.shephertz.app42.paas.sdk.csharp.connection.RESTConnectorWWW:ExecutePost(String, Dictionary`2, String, Dictionary`2, Dictionary`2, App42CallBack)
com.shephertz.app42.paas.sdk.csharp.user.UserService:CreateUser(String, String, String, App42CallBack)
novoTesteCad:novoCad() (at Assets/novoTesteCad.cs:25)
UnityEngine.EventSystems.EventSystem:Update() (at C:/Program Files/Unity/Hub/Editor/2019.2.15f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)
 
asked Jan 10, 2020 in Unity by alexandre (10 points)

1 Answer

0 votes

Hi Alexandre,

Greeting!!

Please have a look at this link for the reference and let us know if the issue still continues.

We will be happy to help you.

Regards,

Priyanka Singh

App42 Team

answered Jan 13, 2020 by anonymous
After some tests I realized that Unity3D after an unsuccessful attempt to send data due to a very long username, for example, register this failure somewhere (still exactly where). I solved the problem by renaming the ProjectSettings folder and forcing Unity3D to re-paint the project and recreate the ProjectSettings folder. This solved for me and the error disappeared.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...