Problems when run WSA Windows 8.1 and PUN v1.72

Options
On connect got error:
Connect() to 'ns.exitgames.com' failed: System.InvalidOperationException: A delegate was assigned when not allowed. (Исключение из HRESULT: 0x80000018)
at Windows.Foundation.IAsyncAction.put_Completed(AsyncActionCompletedHandler handler)
at System.WindowsRuntimeSystemExtensions.AsTask(IAsyncAction source, CancellationToken cancellationToken)
at ExitGames.Client.Photon.SocketTcpNetFxCore.Connect()

On other platforms works well

Comments

  • jeanfabre
    Options
    Hi,

    Are you properly connected to the internet on that device? can you double check?

    Is it happening with the demo scenes too?

    Bye,

    Jean
  • AlexL
    Options
    Yes, Internet connection is perfect. In editor connect works perfect. After build for Windows Store Application target Windows 8.1 and run under Windows 10 got that error.

    In your example demo error is same.

    Log from demo scenes:

    Update() was called by Unity. Scene is loaded. Let's connect to the Photon Master Server. Calling: PhotonNetwork.ConnectUsingSettings();

    (Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: 40)


    'PhotonBug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Networking.HostName.dll'. Symbols loaded.
    'PhotonBug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Networking.dll'. Symbols loaded.
    'PhotonBug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\FirewallAPI.dll'. Symbols loaded.
    'PhotonBug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Windows.Networking.Connectivity.dll'. Symbols loaded.
    'PhotonBug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\fwbase.dll'. Symbols loaded.
    Exception thrown: 'System.InvalidOperationException' in System.Runtime.WindowsRuntime.dll
    Exception thrown: 'System.InvalidOperationException' in System.Runtime.WindowsRuntime.dll
    'PhotonBug.exe' (Win32): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll'. Symbols loaded.
    Connect() to 'ns.exitgames.com' failed: System.InvalidOperationException: Представитель назначен, когда не разрешено. (Исключение из HRESULT: 0x80000018)
    at Windows.Foundation.IAsyncAction.put_Completed(AsyncActionCompletedHandler handler)
    at System.WindowsRuntimeSystemExtensions.AsTask(IAsyncAction source, CancellationToken cancellationToken)
    at ExitGames.Client.Photon.SocketTcpNetFxCore.Connect()

    (Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: 40)
  • AlexL
    Options
    Used your last 1.73 version
  • jeanfabre
    Options
    Hi,

    Which version of Unity are you using?

    Bye,

    Jean
  • AlexL
    Options
    Unity 5.3.6p1
  • jeanfabre
    Options
    ok, I'll test asap and get back to you on this.

    Bye,

    Jean
  • jeanfabre
    Options
    Hi,

    What's your build configuration? Arm, x86 or else?

    Bye,

    Jean
  • AlexL
    Options
    x86
  • AlexL
    Options
    UWP build for configuration x64 and x86 have same bug
  • AlexL
    Options
    UWP master build work, but establish connection is very slow
  • AlexL
    Options
    PhoneSDK81 on ARM build and run on phone have same bug:

    Update() was called by Unity. Scene is loaded. Let's connect to the Photon Master Server. Calling: PhotonNetwork.ConnectUsingSettings();

    (Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: 40)


    Exception thrown: 'System.InvalidOperationException' in System.Runtime.WindowsRuntime.NI.DLL
    Exception thrown: 'System.InvalidOperationException' in System.Runtime.WindowsRuntime.NI.DLL
    Connect() to 'ns.exitgames.com' failed: System.InvalidOperationException: A delegate was assigned when not allowed. (Exception from HRESULT: 0x80000018)
    at Windows.Foundation.IAsyncAction.put_Completed(AsyncActionCompletedHandler handler)
    at System.WindowsRuntimeSystemExtensions.AsTask(IAsyncAction source, CancellationToken cancellationToken)
    at System.WindowsRuntimeSystemExtensions.AsTask(IAsyncAction source)
    at ExitGames.Client.Photon.SocketTcpNetFxCore.Connect()

    (Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: 40)
  • jeanfabre
    Options
    Hi,

    Ok. I can testify that 1.73 works on Universal 8.1 x86. So can you update pun from the asset store and test again? thanks :)

    else, can you test with the demos provided with pun,, "DemoWorker" being a good start for example.

    Bye,

    Jean
  • jeanfabre
    Options
    Hi,

    this is odd. I can't reproduce this. My tests run fines here.

    did you change the dll settings? if yes, can you detail what was changed?

    Bye,

    Jean
  • AlexL
    Options
    We use TCP protocol. Tested on UDP now and it work perfect! But we prefer use TCP protocol, it's important for us.
  • AlexL
    Options
    And how you build Universal 8.1? Your default import plugins settings only for SDK81, for PhoneSDK81 build require change metro plugin import settings.
  • jeanfabre
    Options
    Hi,

    Thanks for the tips on tcp over udp. Indeed I can reproduce the bug this way. We are currently looking into this.

    Metro dll is set to "Any SDK" and build SDK is "Universal 8.1"

    Thanks for your help :) I'll post here when we have a solution.

    Bye,

    Jean
  • Tobias
    Options
    I could reproduce the issue and I think I got it fixed, too.
    Will message you a package. Please test and give feedback.
  • AlexL
    Options
    Yes, fix work like a charm! Any ETA for updated production package?
  • Tobias
    Options
    We refactored quite a bit internally and are testing things in the new version.
    Maybe we can release something next week but this is vague.
    However, it's about time to update :)