demo-realtime-unity-iPhone Fails on device

Options
nickdep7
edited September 2010 in DotNet
Hi Guys

I am trying the "Photon-Unity3D_v5-7-4_SDK" - "demo-realtime-unity-iPhone" with both "Unity iPhone 1.7.0f1 (38208)" and "Unity3.0.0b7 (49415)"

In iPhone Unity 1.7 the demo works fine no problems connecting. What happens in Unity3 is that I get no error in the Unity Editor (when pressing play), but on the device I do get the below error in my xCode Console "MissingMethodException: Method not found: 'Default constructor not found...ctor() of System.Configuration.ExeConfigurationHost'." after Game.Connect()[line:173] full details below. I have in both cases checked that a script contains "Application.runInBackground = true;" and that "Strip Assemblies" is set in my "Player" settings. Can anyone please help me understand what is going wrong.

[Session started at 2010-09-05 02:06:11 +0100.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1470) (Thu May 27 05:54:06 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys004
Loading program into debugger…
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-16078-71
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
sharedlibrary apply-load-rules all
continue
2010-09-05 02:05:55.963 demoRealtimeUnityiPhone[1527:307] -> registered mono modules
-> applicationDidFinishLaunching()
Mono path[0] = '/var/mobile/Applications/E92120DF-1EA1-4416-85C3-F21D8799DB54/demoRealtimeUnityiPhone.app/Data/Managed'
Creating OpenGLES1.x graphics device
Non platform assembly: /private/var/mobile/Applications/E92120DF-1EA1-4416-85C3-F21D8799DB54/demoRealtimeUnityiPhone.app/Data/Managed/UnityEngine.dll (this message is harmless)
Non platform assembly: /private/var/mobile/Applications/E92120DF-1EA1-4416-85C3-F21D8799DB54/demoRealtimeUnityiPhone.app/Data/Managed/Assembly-CSharp.dll (this message is harmless)
Non platform assembly: /private/var/mobile/Applications/E92120DF-1EA1-4416-85C3-F21D8799DB54/demoRealtimeUnityiPhone.app/Data/Managed/PhotonUnity3D.dll (this message is harmless)
Non platform assembly: /private/var/mobile/Applications/E92120DF-1EA1-4416-85C3-F21D8799DB54/demoRealtimeUnityiPhone.app/Data/Managed/System.dll (this message is harmless)
Non platform assembly: /private/var/mobile/Applications/E92120DF-1EA1-4416-85C3-F21D8799DB54/demoRealtimeUnityiPhone.app/Data/Managed/System.Configuration.dll (this message is harmless)
Non platform assembly: /private/var/mobile/Applications/E92120DF-1EA1-4416-85C3-F21D8799DB54/demoRealtimeUnityiPhone.app/Data/Managed/System.Xml.dll (this message is harmless)
Non platform assembly: /private/var/mobile/Applications/E92120DF-1EA1-4416-85C3-F21D8799DB54/demoRealtimeUnityiPhone.app/Data/Managed/PhotonUnity3D.dll (this message is harmless)
usePhoton.Start{0}[line:52]

(Filename: /Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 2550)

usePhoton.Start{1}[line:58]

(Filename: /Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 2550)

Game.Connect{0}[line:170]

(Filename: /Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 2550)

Game.Connect{1}[line:173]

(Filename: /Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 2550)

MissingMethodException: Method not found: 'Default constructor not found...ctor() of System.Configuration.ExeConfigurationHost'.
at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0
at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0
at System.Configuration.InternalConfigurationSystem.Init (System.Type typeConfigHost, System.Object[] hostInitParams) [0x00000] in <filename unknown>:0
at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in <filename unknown>:0
at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0
Rethrow as ConfigurationErrorsException: Error Initializing the configuration system.
at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.CheckProtocolSupport () [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket..cctor () [0x00000] in <filename unknown>:0
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for System.Net.Sockets.Socket
at ExitGames.Client.Photon.NConnect..ctor (ExitGames.Client.Photon.EnetPeer npeer, System.String ipPort) [0x00000] in <filename unknown>:0
at ExitGames.Client.Photon.EnetPeer.Connect (System.String ipport, System.String appID) [0x00000] in <filename unknown>:0
at ExitGames.Client.Photon.PhotonPeer.Connect (System.String ipport, System.String appID) [0x00000] in <filename unknown>:0
at ExitGames.RealtimeDemo.Game.Connect () [0x00000] in <filename unknown>:0
at usePhoton.Start () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

-> force accelerometer registration
-> applicationDidBecomeActive()

Comments

  • Tobias
    Options
    Hi nickdep7,
    I can reproduce the issue in Unity 3b7 and reported it as bug.
    The demo-realtime-unity-iPhone works out of the box in Unity 1.7.0f1 iPhone for me.

    I tested our latest client code and it works nicely in either version of Unity. Maybe it's about time to release it :)
    If no unknown issues come up, I will release a new SDK later today and update you here.
  • Tobias
    Options
    I just uploaded the new version as v5.9.0 SDK. This is tested on Unity iPhone 1.7 and Unity 2.6 (webplayer build).
    Let me know if you find anything suspicious.

    And make sure to set your server's address (in first few code lines of Game.cs) for the iPhone build.
  • excellent I will give it a go...
  • Yip its still working in 1.7 but same result on 3.0 Beta 7. Thanks for the reply I look forward to the bug fix.