Getting errors when trying to generate PhotonServerSettings

Options
Hey
I have been trying to migrate to PUN2 but I have been experiencing issues trying to generate the new PhotonServerSettings. Basically I completely removed my PUN1 and installed PUN2 and when I go to the PUN setup and try setup my account with an app ID and .

Undo object may not be null.
UnityEditor.Undo:RecordObject(Object, String)
Photon.Pun.PhotonEditor:UiSetupApp() (at Assets/Imports/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs:395)
Photon.Pun.PhotonEditor:OnGUI() (at Assets/Imports/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs:310)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


NullReferenceException: Object reference not set to an instance of an object
Photon.Pun.PhotonEditor.UiSetupApp () (at Assets/Imports/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs:396)
Photon.Pun.PhotonEditor.OnGUI () (at Assets/Imports/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs:310)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:359)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:353)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:329)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:374)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:341)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:298)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:483)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:466)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:447)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:93)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:190)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:255)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)



I was trying to debug the PUN wizard and found that we the PhotonNetwork.PhotonServerSettings is always null. I was wonder if anyone has experienced this ?

I'm currently using unity 2019.2.0f1 in windows 10

Thanks

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Mercutio,

    Thank you for choosing Photon!

    Could you reproduce by importing PUN2 in a clean empty fresh new project?
    If PhotonServerSettings is created there, maybe copy-paste it into your project's "Resources" folder?
  • Mercutio
    Options
    Cool Thanks
  • hunabku94
    Options
    Same problem but can't solve it.
    Produce on each new Pun setup on each new unity project.
  • hunabku94
    Options
    UP ?
  • hunabku94
    Options
    Work now without any modification on system, in unity, or in pun.
    Thanks for help.
  • Tobias
    Options
    @hunabku94, this makes me guess it's a weird Unity issue. It's super rare and we can't yet repro. Just as you can't anymore?!

    It would be nice of you, if you'd update your review in the Asset Store, unless you are sure this is our fault.

    Sorry for the hassle in any case.
  • hunabku94
    hunabku94
    edited November 2020
    Options
    I have these probleme again, randomly, with new projects :(

    I forget to update the asset store review, sorry, i'll do now.
  • hunabku94
    hunabku94
    edited November 2020
    Options
    I realy sure it's an Unity bug, because works in 2019.4.11 but not with most recent versions.

    Unfortunally, i can't found why a this moment.

    Maybe the 2019.4.12 realease note can help you more than me :
    https://unity3d.com/fr/unity/whats-new/2019.4.12
  • Tobias
    Options
    I am sorry the problems come back randomly. I know this must be annoying.
    I tested in 2019.4.13 and while I could not find the cause for the problems exactly, I refactored the setup / file creation process somewhat and think the next iteration should be more resilient to latest Unity versions (they import in more than one step now, which we weren't prepared for).

    I have a test package for the new settings handling in PUN v2.23. It includes a lot of other changes but excludes Chat and other APIs. If you got the time, you could possibly import this a few times into a new empty project and let us know if the issues still happen.


    Thanks for the update of the review.
  • hunabku94
    hunabku94
    edited November 2020
    Options
    For sure, i will test it.
  • hunabku94
    Options
    I can confirm import 2.23b unitypackage fix my problem !!!