MissingMethodException in UNet matchmaking


I’ve been playing around with the UNet service, specifically trying to implement the matchmaking for my little game prototype. I got to a point where I can reliably play using the matchmaking service and connect to/from the editor to/from a separate stand-alone client.

Then I decided to test it out on my android device (Lenovo P70-A) and for some reason, it didnt’ work.
So, I fired up the ADB and tried to inspect what was happening. This is the output from my device:

I/Unity (11519): MatchMakingClient ListMatches :https://mm.unet.unity3d.com/json/reply/ListMatchRequest
I/Unity (11519):
I/Unity (11519): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bugBindings.gen.cpp Line: 37)
I/Unity (11519):
I/Unity (11519): MissingMethodException: Method not found: ‘Default constructo
r not found…ctor() of UnityEngine.Networking.Match.ListMatchResponse’.

I/Unity (11519): at System.Activator.CreateInstance (System.Type type, Boole
an nonPublic) [0x00000] in :0
I/Unity (11519): at System.Activator.CreateInstance (System.Type type) [0x00
000] in :0
I/Unity (11519): at System.Activator.CreateInstance[ListMatchResponse] () [0
x00000] in :0

The first line is output automatically by the matchmaking client, upon calling it in a method like this:
_matchMaker.ListMatches(0, 20, string.Empty, OnMatchList);

OnMatchList is a callback that is called as soon as the matchlisting is complete (it’s a coroutine). If it was working, the output would contain raw json response from the matchmaking service (probably for debug purposes). But instead, it outputs that.

Anyone has any idea, what is happening? I’m building the app for API Level 9 (2.3.1) and I’m using Unity Pro. I googled a bit and found out that some people have issues with the reachability of the service, but I have no such issues using editor or stand-alone client.

I already upgraded to the latest 5.3.5 version. I noticed in patch notes that there was another bug with the same exception, but in a different component. I hoped it was somewhat related, but it wasn’t.

Thanks in advance!

I accidentally figured it out.

It seems that Stripping Level set to other than “Disabled” causes the parameter-less constructor of the aforementioned struct (ListMatchResponse) to be stripped away and thus causing the exception.

Also, while testing it in a separate minimal project I used to send with a bugreport and trying to force the error/exception by changing the stripping level back to non-Disabled, I got a bit different exception.

So it seems that this issue is not exclusively related to matchmaking code.

tl;dr Changing stripping level to Disabled “fixes” the issue. Bug report has been sent.