iOS: NullReferenceException: A null value was found where an object instance was required. #435

dfiverr opened this Issue Aug 10, 2016 · 11 comments


None yet

4 participants

dfiverr commented Aug 10, 2016 edited

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.

dfiverr commented Aug 17, 2016

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?

dfiverr commented Aug 18, 2016

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?

SoylentGraham commented Aug 22, 2016 edited

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 ("")] and AssemblyFileVersion ("")]

dfiverr commented Aug 23, 2016

@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?

SoylentGraham commented Aug 23, 2016 edited

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)

dfiverr commented Sep 1, 2016

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:

More info on about code stripping and where to place link.xml here:

NOTE: if you're running Unity 5.4, UnityWebRequest is no longer in the Experimental namespace, just UnityEngine.Networking.UnityWebRequest, et al.

dfiverr commented Sep 2, 2016

Thank you so much @Ethan-VisualVocal !
Where can I find the link.xml file?


@dfiverr you make it... read the docs i linked.

dfiverr commented Sep 2, 2016

@Ethan-VisualVocal Thank you, it works now :D !

@dfiverr dfiverr closed this Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment