Closed mol-x closed 8 years ago
can you tell me if this is on android or ios?
This is on ios.
I am able to see that log within the Unity console, but I am not seeing it in XCode when playing the game on the device.
It's possible that exception occurs at https://github.com/aws/aws-sdk-unity/blob/master/Assets/AWSSDK/src/Services/MobileAnalytics/Custom/Delivery/_unity/DeliveryClient.cs#L97.
Can you add try catch around it ? We recently find similar issue on mobile device.
After adding a try catch around that line and some logging, I am seeing "EventStoreException: Event cannot be stored." and "AmazonClientException: NOT NULL constraint failed: ma_events.ma_event".
Based on the research we've been conducting the last couple of days, it seems this is an issue with only iOS and how the compiler is working. We are also getting this error - "Attempting to call method 'System.Reflection.MonoProperty::GetterAdapterFrame' for which no ahead of time (AOT) code was generated."
We are wondering if creating the JSON string ourselves or using a different JSON parser other than LitJSON would be an appropriate workaround for the time being?
Any feedback would be great.
Hi, search online I found similar issue reported here http://forum.unity3d.com/threads/unity-5-0-3f2-il2cpp-problem-attempting-to-call-method-system-reflection-monoproperty-getteradapt.332335/
Can you try to use "Net 2.0 subset". It should work around this issue.
We are currently using a couple plugins that require us to use .Net 2.0. We are exploring multiple workarounds to try to get everything working as we need.
Just wanted to let you guys know, we were able to get our analytics reporting from iOS devices by changing a line of code in the JsonMapper.cs file. This fix allows us to continue running with .NET 2.0 and not the Subset.
Through our research we were able to find that on iOS devices you can't have code cause JIT(Just-In-Time) compilation. The method that was causing this issue was PropertyInfo.GetValue() as you can see below:
847 WriteValue (p_info.GetValue (obj, null),
848 writer, writer_is_private, depth + 1);
847 WriteValue (p_info.GetGetMethod().Invoke (obj, null),
848 writer, writer_is_private, depth + 1);
Thanks for your solution !
What iOS device are you using ? Do you use IL2CPP ?
The issue was occurring on all our beta testers, which includes basically every iOS device starting at iPhone 4 and later.
We are building with IL2CPP as well.
Fixed in Version 2.0.0.5
Hello,
We've been implementing Mobile Analytics into our game, and are running into an issue with the events not being reported when sent from the device, but working perfectly fine in the Unity editor.
-We are using Unity version 5.1.2f1 -We are using the AWS SDK version 2.0.0.3
We are wondering if there is something we are missing in our implementation. Let us know if you need anymore information.
Thanks, -Nick