-
Notifications
You must be signed in to change notification settings - Fork 863
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
Unity : S3Example GetObjects not working. User-Agent header issue #643
Comments
Hi, could you provide a sample code that repros this problem? |
I downloaded the Unity SDK from here http://sdk-for-net.amazonwebservices.com/latest/aws-sdk-unity.zip Here is function I am using from S3Example.cs
Error is in following line
You can see exception stack trace in question above |
I'm experiencing a similar issue with Cognito Identity and Unity 2017.1.0b4 on MacOS. Unity made some additional changes to
I've tried with both MobileAnalytics and the S3 sample (in a new empty project). After adding Ids/regions to the sample script and starting the project I get the following error:
UnityPackage:
|
@schakkis, it sounds like the problem you are seeing is different, can you please open a new issue? |
@PavelSafronov Should I still report a new issue, or is it okay to keep it here? |
Ah, I see what you mean. OK, this seems like the appropriate issue then. Can you try attaching the below callback to find out what the problematic header is?
|
Just ran a quick test; here is the log output:
|
I couldn't find |
@kashifshabbir |
There you go! |
I did a little more investigation. It looks like AWSSDK doesn't properly detect that it should be using If I manually set the client it seems to be working fine. |
Thanks a lot. It is fine with this workaround now! |
Short update; We started looking into Unity 2017.1 now again since they are closing in on release. Testing with Unity 2017.1.0f1 this error still occurs. We have also discovered a related problem; Unity has changed more things in UnityWebRequest and the reflection code in AWS SDK (UnityWebRequestWrapper.cs) doesn't work anymore. See https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/Pipeline/_unity/UnityWebRequestWrapper.cs#L56
|
Thanks for update. This workaround I am using unity 2017.1.0b2 on macOS Sierra. I am getting following error in Windows Platform Build
For now I am waiting for unity 2017.1 to come out of beta. |
@kashifshabbir |
Having same issue as @Niknokc. Works on OSX not on Android build. |
Any chance this will be fixed in the official AWSSDK release for Unity soon? I was hoping #709 might fix it, but this issue still appears to be active for 2017.1. We could go the rolling our own dll approach, but would prefer that the official release supports 2017.1 out of the box. Thanks! |
Still no update on this? Unity is on 2017.2 now, been out for a while. Why is SDK still broken? |
Apparently, pull request #709 still did not totally fix the same issue. I'm still receiving the bug message below in Unity 2017.1 versions (specifically, 2017.1.2p2)
Here's a temporary fix for Unity 2017.1 versions. Presumably, this should also work in Unity 2017.2 versions if you have the same bug, but I haven't tested. @schakkis was right, all you need is to manually override the target // UnityMainThreadDispatcher.cs
public void Awake()
{
_logger = Logger.GetLogger(this.GetType());
// Call the method to process requests at a regular interval.
_nextUpdateTime = Time.unscaledTime;
_nextUpdateTime += _updateInterval;
// Override HttpClient here
Amazon.AWSConfigs.HttpClient = Amazon.AWSConfigs.HttpClientOption.UnityWebRequest;
} As you can see, simply override the HttpClient as suggested by @schakkis in the |
setting the client manually is working for OSX but not for iOS:
Any solution? |
Hi @mosky17, For iOS, do you have a link.xml file that contains the content as described in https://github.com/aws/aws-sdk-net/blob/master/Unity.README.md#unity-sdk-fundamentals? |
thanks for your response @kvasukib , my issue was resolved after updating the cognito library, seems it was out of date. |
Hi @chenchen2015, We covered setting the client manually here: https://aws.amazon.com/blogs/mobile/unity-v3-support-in-the-aws-sdk-for-net-is-out-of-preview/. |
Thank you @kvasukib I was hoping that AWS could solve this issue. |
Hi @neosatus, Can you follow this guide https://aws.amazon.com/blogs/mobile/unity-v3-support-in-the-aws-sdk-for-net-is-out-of-preview/ and set the HttpClient to UnityWebRequest manually in the app? |
i encountered similar problem, with sns package (3.3.0.25) Need some advice. |
Hi @almorak, please open a new issue if you are still having issues with the SnsClient. It will be much easier for you, other customers, and AWS to follow if your problem is on its own issue. |
You can now, use sdk of S3 modified and better: https://github.com/IsmaelNascimento/aws-sdk-s3-for-unity |
In my case the same line is not throwing any exceptions nor callback is called... Any idea what to do? This happens only on initial ios app installation, if restart the app - works fine. |
We have noticed this issue has not recieved attention in a year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue. |
I downloaded latest unity SDK "aws-sdk-unity_3.3.83.0.zip" and installed S3 unitypackage.
but in GetObjects function I am getting error. Following is trace of the problem
Expected Behavior
It used to work seamlessly in Unity version 5.6
Steps to Reproduce
Simply running example scene can reproduce issue
Your Environment
I am currently using Unity 2017.1.0b2 and building for MAC platform.
.NET version in Unity build settings: 3.5
The text was updated successfully, but these errors were encountered: