PhotonNetwork mobile issues

So, I have been working with Photon for a week now and it works great when running on pc. When trying to build to iOS or Android, I have encountered an issue when connecting to the cloud. Frankly, the game won't connect, it quits on iOS with xcode saying builtinTrap() and the log shows that it tried to connect to all of the different cloud servers with no success. Android was a short test on a Nexus tablet that also failed to connect to any cloud server. This hold up is huge and I am worried that it might not be a part of the 4.3.1 or 4.3.2 issues.

Comments

  • We regularly test PUN with iOS and Android and have many customers using it, too. The problem is certainly specific to your case.
    Are you using PUN+ or PUN Free? Which version of Unity do you use and which licenses do you have for mobile each?

    builtinTrap() is new to me and doesn't sound like anything I saw so far. Please attach a full log.
    Do you connect to all regions or how do you try to connect exactly?
  • The following is the stack in xcode, the program crashes when PhotonNetwork.ConnectUsingSettings("0.1"); is called.
    (Filename: /Applications/buildAgent/work/d3d49558e4d408f4/Runtime/Mono/MonoBehaviour.cpp Line: 1699)
    
    Exception caught! Assembly-CSharp Message: An exception was thrown by the type initializer for System.Net.Dns
    PhotonView:Awake() (at /Volumes/NO NAME/MonsterMelee/Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:166)
    PhotonView:Awake() (at /Volumes/NO NAME/MonsterMelee/Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:162)
     
    (Filename: /Volumes/NO NAME/MonsterMelee/Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs Line: 166)
    
    Could not resolve host: app-eu.exitgamescloud.com
    PhotonView:Awake() (at /Volumes/NO NAME/MonsterMelee/Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:166)
    PhotonView:Awake() (at /Volumes/NO NAME/MonsterMelee/Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:162)
     
    (Filename: /Volumes/NO NAME/MonsterMelee/Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs Line: 166)
    
    (lldb) 
    
    the folloing is the function that the lldb linked to:
    // This function will be called when AppDomain.CurrentDomain.UnhandledException event is triggered.
    // When running on device the app will do a hard crash and it will generate a crash log.
    void CrashedCheckBellowForHintsWhy()
    {
    #if ENABLE_CRASH_REPORT_SUBMISSION
    	// Wait if app has crashed before we were able to submit an older pending crash report. This
    	// could happen if app crashes at startup.
    	WaitWhileCrashReportsAreSent();
    #endif
    
    #if ENABLE_IOS_CRASH_REPORTING || ENABLE_CUSTOM_CRASH_REPORTER
    	// Make app crash hard here
    	__builtin_trap();
    
    	// Just in case above doesn't work
    	abort();
    #endif
    }
    

    Also, I believe that I am using PUN free, Unity 4.3.2f1, and I have Unity Android Pro and iOS Pro so sockets aren't the issue.
  • Obviously, for some reason, your client can't do the DNS resolution: "Could not resolve host: app-eu.exitgamescloud.com".
    You should check your player settings (maybe you need to define some iOS rights?!) in the Editor and the device's setup.

    It might be due to that exception "Exception caught! Assembly-CSharp Message: An exception was thrown by the type initializer for System.Net.Dns".
    I never had this myself but searching for "An exception was thrown by the type initializer for System.Net.Dns" and "unity" might find something.

    Edit: There is a new Unity version 4.3.3 which you should update to. It fixes a few bugs that affected PUN, too. Just in case.
  • Thank you for your help, the issue was in player settings, I needed to try NET 2.0 Subset instead of NET 2.0.
    I have another issue now and that is when one of my games exist and another player tries to join they can't and are crashing on the failed attempt.
    EDIT: Problem was that I get an error everytime that I join a game that is linked with an RPC for an object that doesn't yet exist, solution is to change script call optimization in the player settings to slow and safe instead of fast but no exceptions
  • Are you OK by now? Sorry for the late reaction!