I'm getting the following exception over and over on iOS using the Unity SDK (using AWS Lambda, AWS S3, AWS Cognito):
NullReferenceException: A null value was found where an object instance was required.
at Amazon.Runtime.Internal.UnityMainThreadDispatcher.ProcessRequests () [0x00000] in:0
at Amazon.Runtime.Internal.UnityMainThreadDispatcher.Update () [0x00000] in:0
at System.IEquatable1[T].Equals (.T other) [0x00000] in <filename unknown>:0 at System.IEquatable1[T].Equals (.T other) [0x00000] in:0
at System.IEquatable1[T].Equals (.T other) [0x00000] in <filename unknown>:0 System.IEquatable1:Equals(T)
System.IEquatable1:Equals(T) System.IEquatable1:Equals(T)(Filename: currently not available on il2cpp Line: -1)
This is not happening in the Editor. Am I missing something here? Please let me know what would be causing this and how I could debug it, thank you.
Any ideas?
Can you give me some information as to version of sdk , version of unity and also can you enable logs and tell me what's the response you are getting?
@karthiksaligrama
The SDK is 3.1.89 and Unity is 5.3.4, what logs would you like to see?
I think the issue is my Assets\Plugins\iOS folder does not have anything AWS related in it - does your Assets\Plugins\iOS folder have any iOS related scripts in it?
Same issue. Unity 5.3.6f1. Not sure of AWS .net version (there seem to be a lot of builds scattered about, and I can't see any version numbers bundled in the assets)
Editor in OSX runs, ios (ipad air2) prints above
This is just having a game object with this inside it (not using any other functions or objects)
void Start () {
AwsPrefab.Attach (this.gameObject);
}
Edit: assemblies say; [assembly: AssemblyVersion ("3.1.0.0")] and AssemblyFileVersion ("3.1.10.0")]
@karthiksaligrama Can you please advise what version this is not an issue in? It is important I get this working, can you please advise?
@SoylentGraham It is good to hear I am not the only one experiencing this issue. Thank you so much for providing additional details, have you been able to fix it?
Not yet, but I may have to dive into it soon, as I have another problem with this SDK/my S3 setup, but the current code doesn't expose the data I need
Note, I don't get this issue on OSX (in editor, or a build, which responds to my commands, listing objects etc)
Any update on this?
@dfiverr @SoylentGraham I just ran into this today -- it's a code stripping issue. You need to configure a link.xml file to preserve the AWS code you reference (directly or indirectly) and add that file to your Unity project.
Instructions/example found at the bottom of here: https://github.com/aws/aws-sdk-net/blob/master/Unity.README.md
More info on about code stripping and where to place link.xml here:
https://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html
NOTE: if you're running Unity 5.4, UnityWebRequest is no longer in the Experimental namespace, just UnityEngine.Networking.UnityWebRequest, et al.
Thank you so much @Ethan-VisualVocal !
Where can I find the link.xml file?
@dfiverr you make it... read the docs i linked.
@Ethan-VisualVocal Thank you, it works now :D !
Most helpful comment
@dfiverr @SoylentGraham I just ran into this today -- it's a code stripping issue. You need to configure a
link.xmlfile to preserve the AWS code you reference (directly or indirectly) and add that file to your Unity project.Instructions/example found at the bottom of here: https://github.com/aws/aws-sdk-net/blob/master/Unity.README.md
More info on about code stripping and where to place
link.xmlhere:https://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html
NOTE: if you're running Unity 5.4, UnityWebRequest is no longer in the
Experimentalnamespace, justUnityEngine.Networking.UnityWebRequest, et al.