aws-samples / aws-sdk-unity-samples

This repository has samples that demonstrate various aspects of the AWS Mobile SDK for Unity, you can get the SDK source on Github (https://github.com/aws/aws-sdk-net)
Other
160 stars 107 forks source link

Setup errors and invalid operation exception #39

Open jmdjr opened 4 years ago

jmdjr commented 4 years ago

I have been following the example, but trying to start the game throws an exception:

InvalidOperationException: Cannot override system-specified headers UnityEngine.Networking.UnityWebRequest.SetRequestHeader (System.String name, System.String value) (at :0) UnityEngine.WWW..ctor (System.String url, System.Byte[] postData, System.Collections.Generic.Dictionary`2[TKey,TValue] headers) (at <545425060cf44a88bfddbe49cbfe1747>:0) Amazon.Runtime.Internal.UnityMainThreadDispatcher+d__7.MoveNext () (at C:/a/uv3/sdk/src/Core/Amazon.Runtime/Pipeline/_unity/UnityMainThreadDispatcher.cs:130) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <05f2ac9c8847426992765a22ef6d94ca>:0) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) Amazon.Runtime.Internal.UnityMainThreadDispatcher:ProcessRequests() (at C:/a/uv3/sdk/src/Core/Amazon.Runtime/Pipeline/_unity/UnityMainThreadDispatcher.cs:71) Amazon.Runtime.Internal.UnityMainThreadDispatcher:Update() (at C:/a/uv3/sdk/src/Core/Amazon.Runtime/Pipeline/_unity/UnityMainThreadDispatcher.cs:57)

this seems to happen between client context setup for mobile analytics and when mobile analytics begins store session info. I know with asyncronous calls this could be anything but it is preventing me from continuing on.

This issues occurs on Unity version 2019.3.9f1 Personal

derwaldgeist commented 4 years ago

Same here. I tried the S3 sample and it blew up because of this.

(Also, setting the loggers in awsconfig.xml did not work as described. Got a NullPointerReference exception for this.)