Game Center matching overloaded?

Our app has been using Game Center for a multi-player game for many years. Invitations among friends worked quite reliably, invitations via iMessage less reliably but sufficiently, auto-match sometimes very well and sometimes not at all. Over the last few days, this has degraded substantially. Auto-match always fails, iMessage most of the time, and invitations among friends much less reliably, so that 2-player games connect after two or three tries, but 4-player games are hard.


We do have much more demand from users who have to stay at home because of the pandemic, and I assume other games have as well. Could it be that Apple's Game Center servers are overloaded?


What is particularly annoying is that GKMatchmakerViewController emphasizes auto-match and iMessages, and hides well the option to add and invite friends. Is there a way of making it jump directly to the screen to invite friends already connected via Game Center?

We've had a couple users tell us that Game Center real-time matchmaking doesn't work anymore after updating to iOS 13.4 (just released a few days ago). One user says turn-based matches still work, and only real-time matches are broken. I don't know if this is related to the issues you're seeing or not.

Is this is still happening? If so, please please submit a bug report via Feedback Assistant.

Yes, this is still happening to the users who reported the problem to us. One user even reverted his device to iOS 13.3.1, and real-time auto-match started working for him again. However, I have tested myself on a device running iOS 13.4, and I was not able to reproduce the problem (real-time auto-match worked on my test device). Also, other users are still able to real-time auto-match on iOS 13.4, so the issue isn't happening to everyone.


Using the iOS simulator, I've found the following:


- the iOS 13.4 simulatorencounters an error and is NOT able to real-time auto-match

- the iOS 13.3 simulator encounters the same error and is NOT able to real-time auto-match

- the iOS 10.3 simulator IS able to real-time auto-match


I don't know if the 13.X simulator error is related to what's occurring on the actual devices of the users with the problem as I'm not able to reproduce it myself on an actual device. The simulator error is:


2020-03-28 14:46:29.383011-0700 <app name>[1761:25471] [Match] initiateRelayRequest returned an error: Error Domain=GKErrorDomain Code=3 "The requested operation could not be completed due to an error communicating with the server." UserInfo={GKServerStatusCode=5008, NSLocalizedDescription=The requested operation could not be completed due to an error communicating with the server., NSUnderlyingError=0x600000c64990 {Error Domain=GKServerErrorDomain Code=5008 "status = 5008, missing required key: self-push-token" UserInfo={GKServerStatusCode=5008, NSLocalizedFailureReason=status = 5008, missing required key: self-push-token}}}


Thus the only info I have is the simulator error above, the fact that this problem is happening to some users only, and the models of the devices that these users are using. Is this enough info to submit a bug report?

It is still happening on our apps as well. It has even worsened since iOS 13.4 and macOS 10.15.4 have been released. One group of players even reported that excluding iOS 13.4 devices from the game improved their chances of connecting. Our recommendation to focus on Game Center friends and avoid iMessage and Auto-Match seems to help as well.


Simulators always behaved differently on GameKit than real devices, so your experiments might guide into wrong conclusions.


We have reported the bug as FB7646205. Apple ignores bugs unless they have been reported many times, so you should report it as well.

Yes, I realize that simulators don't behave exactly the same as real devices. That's why I wasn't sure if I really had enough info to submit a bug report since I'm not able to reproduce the issue myself on a real device.

Try to get your hands on more devices to reproduce. Invitations work most of the time with two real devices, often with three, and more rarely with four. Customers complained it didn't work with six, but I have not assembled that many for testing, yet. One of my test devices is my Mac with the Catalyst version of the app, where the effect is the same.

Have you been able to reproduce the problem when debugging on real devices? If so, what errors are you seeing in the device log? Can you paste the errors here?


I've tested on a number of real devices running various iOS versions. I can't reproduce the problem on any of my devices. However, only one of my devices is running iOS 13.4.


Edit: I now have an iOS 13.4 device that does exhibit the problem. I'll update this post after more testing.

I can't reproduce it when I use 2 devices on the same network. However, I can reproduce it with a coworker on a different network, and I can also reproduce it locally if I tether one device to my phone and leave the other on my wifi.

After www.apple.com/support/systemstatus/ admitted a four-hour Game Center issue on April Fools’ Day, connection chances have increased a tiny little bit, but breakdowns are still very frequent. I did some intensive testing with four devices over the last days and found about a dozen different scenarios where connections break down.


I identified 8 different scenarios were console messages seems to coincide with a connection breakdown. None of them notifies the app to let it react. All of them hint at timeouts or lost messages, and thus at overloaded servers on Apple’s side. Here are typical examples of these messages:


scenario 1:

2020-04-03 16:10:15.795282+0200 AppName[2959:960099] [ViceroyTrace] [ERROR] attempt_failover:4341 Connection timed out for [004B0858] (in clstate 3)

2020-04-03 16:10:15.807142+0200 AppName[2959:960195] [ViceroyTrace] [ERROR] -[GKSessionInternal(_private) newNSErrorFromGKSessionError:description:reason:]:673 Error: 30503 -- Connection timed out..


scenario 2:

2020-04-03 16:14:54.251494+0200 AppName[2426:580756] [ViceroyTrace] [ERROR] SendCollectionRequest:508 /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AVConference/AVConference-1640.8.1.1/ICE.subproj/Sources/ICEMessage.c:508: HandoverReport: failed to send SNATMAP request for [192.168.0.150:16401], error(801A0016). Save message for retry


scenario 3:

2020-04-03 10:01:44.887722+0200 AppName[2228:512032] [ViceroyTrace] [ERROR] OSPFParse_ParsePacketHeader:1083 Bad destination count=0

2020-04-03 10:01:44.888342+0200 AppName[2228:511553] [ViceroyTrace] [ERROR] ICEGetCandidates:580 /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AVConference/AVConference-1640.8.1.1/ICE.subproj/Sources/ICE.c:580: ProcessCollectionResponse failed (8015000C)


scenaro 4:

2020-04-02 18:51:04.771723+0200 AppName[4319:832248] [ViceroyTrace] [ERROR] ICEStopConnectivityCheck:2733 ICEStopConnectivityCheck() found no ICE c


scenario 5:

2020-04-03 10:08:44.206127+0200 AppName[4745:989071] [ViceroyTrace] [ERROR] AGPSessionRecvFrom:1565 fail: message fragment @index 9 ser 00000000 should be 00000009


scenario 6:

2020-04-03 10:52:24.688927+0200 AppName[2839:906970] [ViceroyTrace] [ERROR] -[GKDiscoveryManager connectToSockAddr:port:forPeer:]_block_invoke_2:279 peer [FEC57AA662DEFB0F] data received with error Connection closed


scenario7:

2020-04-03 15:00:23.804775+0200 AppName[4841:1044343] [ViceroyTrace] [ERROR] ICEGetCandidates:580 /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AVConference/AVConference-1640.8.1.1/ICE.subproj/Sources/ICE.c:580: ProcessCollectionResponse failed (8015000C)


scenario 8:

2020-04-03 15:40:02.542114+0200 AppName[2921:951200] [ViceroyTrace] [ERROR] -[GKDiscoveryManager connectToSockAddr:port:forPeer:]_block_invoke:248 peer [0EB172B1135C04CC] error in connectedHandler [Unable to connect]

2020-04-03 15:40:02.543461+0200 AppName[2921:952495] [Match] Error sending dictionary {

bundleID = "com.company.appname";

bundleVersion = "2.6";

isDevelopmentVersion = 1;

message = 0;

platform = 1;

shortBundleVersion = "2.6";

} to deviceID: 0EB172B1135C04CC, error = Error Domain=GKDiscoveryPeer Code=-1 "Unable to connect" UserInfo={NSLocalizedDescription=Unable to connect}



Some easier scenarios revolve around lost authentication of the local player. Some of them return GKError with codes 6 or 8, which then enables the app to react. I managed to work around some of them by preloading and caching recent players. The lost authentications usually leave the following message in the console:


2020-04-01 18:53:43.275375+0200 AppName[55085:4001598] [Error] _authenticateUsingAlert:Failed to authenticate player with existing credentials.Error: Error Domain=NSURLErrorDomain Code=-1001 "(null)"



Other error messages keep cluttering the console in large numbers but seem to appear independently of success or failures. Here are some examples:


2020-04-01 18:42:45.007690+0200 AppName[55085:4006523] [ViceroyTrace] [ERROR] ProcessEvent:1198 Send BINDING_REQUEST failed(801A0016).

2020-04-01 18:42:45.046783+0200 AppName[55085:4006412] [ViceroyTrace] [ERROR] AGPSessionRecvFrom:1954 0x10105a070 sack: SEARCH FAILURE SERIAL NUMBER (00000005) FROM (2930F198)...

2020-04-01 18:53:45.192184+0200 AppName[55085:4011378] [ViceroyTrace] [ERROR] ReXmitCollectionRequest:628 /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AVConference/AVConference-1640.8.4.1/ICE.subproj/Sources/ICEMessage.c:628: ReXmit [SNATMAP_REQUEST] (1:0) from [192.168.0.214:16398] to [17.173.255.129:16384] failed (801A0016)

2020-04-02 16:29:53.050503+0200 AppName[2671:749372] [ViceroyTrace] [ERROR] OSPFParse_ParsePacketHeader:1083 Bad destination count=0

2020-04-02 16:29:53.322328+0200 AppName[2671:749372] [ViceroyTrace] [ERROR] OSPFParse_ParsePacketHeader:1100 Checksum=42050 doesn't match

2020-04-02 16:29:53.322873+0200 AppName[2671:749616] [ViceroyTrace] [ERROR] RemoveNominatedCandidatePair:982 failed with invalid index input: -1, candidate pair count: 12

2020-04-02 16:29:53.323351+0200 AppName[2671:749616] [ViceroyTrace] [ERROR] ICEStopConnectivityCheck:2733 ICEStopConnectivityCheck() found no ICE check with call id (1187846793)

2020-04-02 16:29:53.328064+0200 AppName[2671:749616] [ViceroyTrace] [ERROR] gckSessionCheckPendingConnections:1446 gckSessionCheckPendingConnections: iICEChecksLeft=0, iUnconnectedNodeCount=0, iDDsExpected=1

2020-04-02 16:30:58.915093+0200 AppName[2671:749812] [ViceroyTrace] [ERROR] -[GKDiscoveryManager connectToSockAddr:port:forPeer:]_block_invoke_2:279 peer [26D308CB935EBD99] data received with error Connection closed

I just submitted a bug report (FB7652145).


I reproduced the issue on an iPad Air 2 running iOS 13.4 (17E255). Both real-time auto-matches and real-time invites failed.

Device logs showed that findMatchForRequest() succeeded/completed, but then the following errors appeared in the log immediately afterwards:


2020-04-04 11:33:40.781004-0700 <app name>[1282:133680] [ViceroyTrace] [ERROR] OSPFParse_ParsePacketHeader:1083 Bad destination count=0

2020-04-04 11:33:40.781500-0700 <app name>[1282:133585] [ViceroyTrace] [ERROR] ICEGetCandidates:580 /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AVConference/AVConference-1640.8.1.1/ICE.subproj/Sources/ICE.c:580: ProcessCollectionResponse failed (8015000C)


...and the match state never changed to "connected".

The latest iOS update (13.4.1) seems to have fixed this issue, at least for my app. Some users have confirmed this, and on my test device which previously failed, real-time matches now work also. If I hear anything different in the coming days, I'll post back here.

I have the exact same issue. My iPhone has 13.4 iOS and I can send (or receive) an Invite request for my game application but the GKMatchmakerViewController for both players (inviter and invitee) remain stuck at "Connecting".


Using the iOS simulator I was able to verify the "didFind match" function is being called, however, the expectedPlayerCount is not 0 so the match never starts. Also, the "didChange state" function is never called to indicate the other player has "connected", so the match still never starts


EDIT

After updating to 13.4.1, this issue has been resolved for me

Having same issue. Appeared suddenly, without changing any GameKit-related code.


update: It seems to be fixed running on the 12.4 simulator. Though I never seem to be matched with anyone, I'm at least not getting errors on the request.


update update: not sure why I was so cavalier about not getting matched with anyone ever. Real-time matching doesn't work if my players don't get matched. Some people seem to be saying that updating to the lates iOS Simulator builds make the problem go away, but I am on Mojave, and I can't update to Catalina, so I can't get the latest iOS Simulators.

Game Center matching overloaded?
 
 
Q