PlayEveryWare / eos_plugin_for_unity

Repository for PlayEveryWare's EOS Plugin for Unity, bringing the functionality of Epic Online Services to the Unity Game Engine.
https://eospluginforunity.playeveryware.com
288 stars 56 forks source link

Login on Editor and Mac works, but Windows dont #655

Closed BestStream closed 5 months ago

BestStream commented 5 months ago

Here is the error log, please advise what the problem is

Start of Early EOS LOG:
2024-05-07T15:03:41.590 NativePlugin (INFORM): about to look with exists
2024-05-07T15:03:41.591 NativePlugin (INFORM): Trying to load eos config via dll
2024-05-07T15:03:41.591 NativePlugin (INFORM): Loading path at C:\Users\Serge\Documents\Sunday Games\Supernova Shards\Builds\235\Supernova Shards1\Supernova Shards_Data\Plugins\x86_64\EOSGenerated.dll
2024-05-07T15:03:41.591 NativePlugin (WARNING): No Generated DLL found (Might not be an error)
2024-05-07T15:03:41.591 NativePlugin (INFORM): json pathC:\Users\Serge\Documents\Sunday Games\Supernova Shards\Builds\235\Supernova Shards1\Supernova Shards_Data\Plugins\x86_64\../..\StreamingAssets\EOS\EpicOnlineServicesConfig.json
2024-05-07T15:03:41.591 NativePlugin (INFORM): On UnityPluginLoad
2024-05-07T15:03:41.591 NativePlugin (INFORM): Loading path at C:\Users\Serge\Documents\Sunday Games\Supernova Shards\Builds\235\Supernova Shards1\Supernova Shards_Data\Plugins\x86_64\EOSSDK-Win64-Shipping.dll
2024-05-07T15:03:41.594 NativePlugin (INFORM): start eos init
2024-05-07T15:03:41.594 NativePlugin (INFORM): call EOS_Initialize
2024-05-07T15:03:41.598 NativePlugin (INFORM): setting up rtc
2024-05-07T15:03:41.598 NativePlugin (WARNING): C:\Users\Serge\Documents\Sunday Games\Supernova Shards\Builds\235\Supernova Shards1\Supernova Shards_Data\Plugins\x86_64\xaudio2_9redist.dll
2024-05-07T15:03:41.598 NativePlugin (INFORM): about to look with exists
2024-05-07T15:03:41.598 NativePlugin (INFORM): json pathC:\Users\Serge\Documents\Sunday Games\Supernova Shards\Builds\235\Supernova Shards1\Supernova Shards_Data\Plugins\x86_64\../..\StreamingAssets\EOS\eos_steam_config.json
2024-05-07T15:03:41.599 LogEOSIntegratedPlatform (Error): Invalid parameter EOS_IntegratedPlatform_Steam_Options.SteamMajorVersion reason: Required to be at least 1.
2024-05-07T15:03:41.599 LogEOSIntegratedPlatform (Error): Invalid parameter Options reason: failed validation: EOS_InvalidParameters
2024-05-07T15:03:41.599 NativePlugin (INFORM): run EOS_Platform_Create
2024-05-07T15:03:41.599 LogEOS (Verbose): Default Network Status: EOS_NS_Online
2024-05-07T15:03:41.599 LogEOS (Info): [Boot] EOSSDK Version 1.16.1-27379709 booting at 2024-05-07T22:03:41.597Z using CSharp
2024-05-07T15:03:41.599 LogEOSRTC (Verbose): A background mode has been assigned. BackgroundMode=[LeaveRooms]
2024-05-07T15:03:41.599 LogEOS (Info): [Boot] EOSSDK Platform Properties [OS=Windows/10.0.19041.1.64bit, ClientId=xyza7891cyPAk48oNKnBPgh8zGiCmjk2, ProductId=214ef5f74ff2426e9288b8dbb5facf8f, SandboxId=p-jrju54me6vz7f53hentqvzt4rbumsr, DeploymentId=08dacc4cbcd3450db3d028c7bd08da8c, ProductName=Supernova Shards, ProductVersion=2.3, IsServer=false, Flags=None]
2024-05-07T15:03:41.599 LogEOSAnalytics (Info): Start Session (User: ...)
2024-05-07T15:03:41.599 LogEOSOverlay (Info): OverlayPath registry key found in HKCU
2024-05-07T15:03:41.722 LogEOSOverlay (Info): Overlay library loaded, version ++EOSSDK+Release-Overlay-CL-25975892
2024-05-07T15:03:41.722 LogEOSOverlay (Info): Beginning dxgi factory detour
2024-05-07T15:03:41.722 LogEOSOverlay (Info): Factory detour complete
2024-05-07T15:03:41.722 LogEOSOverlay (Info): Beginning swap chain detour
2024-05-07T15:03:41.722 LogEOSOverlay (Info): Attempting to create swap chain using D3D11
2024-05-07T15:03:41.722 LogEOSOverlay (Info): Successfully created swap chain using D3D11 with feature level b000
2024-05-07T15:03:41.722 LogEOSOverlay (Info): Swapchain detour complete
2024-05-07T15:03:41.722 LogEOSOverlay (Info): Overlay loaded and initialized
2024-05-07T15:03:41.722 LogEOSAnalytics (Verbose): Record Event: SDKOverlayComponent.Init <Redacted>
2024-05-07T15:03:41.722 LogEOSUI (Verbose): Social Overlay: Configuring intent payload handlers for FSocialOverlayJavascript
2024-05-07T15:03:41.722 LogEOSUI (Warning): Hot key event ignored because there are no known users.
2024-05-07T15:03:41.725 LogEOSAntiCheat (Info): [AntiCheatClient] Anti-cheat client not available. Verify that the game was started using the anti-cheat bootstrapper if you intend to use it.
2024-05-07T15:03:41.725 LogEOSRTC (VeryVerbose): RTCPlatform Establish a new game thread id
2024-05-07T15:03:41.725 LogEOSRTC (Verbose): RTCPlatform RTC has been bound to a game thread id: '24104'
2024-05-07T15:03:41.725 LogEOSRTC (VeryVerbose): RTCPlatform PlatformLibRtcInstance Initializing new SharedLibRtcInstance
2024-05-07T15:03:41.725 LogEOSRTC (Verbose): RTCPlatform Initializing SharedLibRtcInstance
2024-05-07T15:03:41.725 LogEOSRTC (Info): LibRTCCore: Initializing LibRTC...
2024-05-07T15:03:41.725 LogEOSRTC (VeryVerbose): RTCPlatform SharedLibRtcInstance has been fully initialized
2024-05-07T15:03:41.725 LogEOSRTC (VeryVerbose): RTCPlatform PlatformLibRtcInstance Using new constructed SharedLibRtcInstance
2024-05-07T15:03:41.725 LogEOSRTC (Verbose): RTCPlatform InitializeLibRtcSession
2024-05-07T15:03:41.725 LogEOSRTC (VeryVerbose): RTCPlatform Initializing new LibRTC session
2024-05-07T15:03:41.725 LogEOSRTC (Verbose): RTCPlatform Creating LibRTC session
2024-05-07T15:03:41.725 LogEOSRTC (VeryVerbose): RTCPlatform LibRTC session has been fully initialized
End of Early EOS LOG
2024-05-07T15:04:38.5116797-07:00 [1] Epic - Already inited
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
SG.Payments.Epic:Init(Action`1)
Supernova.CurrencyBuyProductsScreen:Open()
SG.UI.Screen:AnimOpen(Dictionary`2, Screen)
SG.UI.UI:ScreenShow(Screen, Dictionary`2, Screen)
SG.UI.Screen:Show()
Supernova.UI:CurrencyBuy()
UnityEngine.Events.InvokableCall:Invoke(Object[])
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ReleaseMouse(PointerEventData, GameObject)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()

NullReferenceException: Object reference not set to an instance of an object.
  at PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.MakeLoginOptions (Epic.OnlineServices.Auth.LoginCredentialType loginType, Epic.OnlineServices.ExternalCredentialType externalCredentialType, System.String id, System.String token) [0x00000] in <00000000000000000000000000000000>:0 
  at PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartLoginWithLoginTypeAndToken (Epic.OnlineServices.Auth.LoginCredentialType loginType, Epic.OnlineServices.ExternalCredentialType externalCredentialType, System.String id, System.String token, PlayEveryWare.EpicOnlineServices.EOSManager+OnAuthLoginCallback onLoginCallback) [0x00000] in <00000000000000000000000000000000>:0 
  at PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartPersistentLogin (PlayEveryWare.EpicOnlineServices.EOSManager+OnAuthLoginCallback onLoginCallback) [0x00000] in <00000000000000000000000000000000>:0 
  at SG.Payments.Epic.Login (System.Boolean force, System.Action`1[T] callback) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <00000000000000000000000000000000>:0 
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ReleaseMouse(PointerEventData, GameObject)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
paulhazen commented 5 months ago
2024-05-07T15:03:41.599 LogEOSIntegratedPlatform (Error): Invalid parameter EOS_IntegratedPlatform_Steam_Options.SteamMajorVersion reason: Required to be at least 1.
2024-05-07T15:03:41.599 LogEOSIntegratedPlatform (Error): Invalid parameter Options reason: failed validation: EOS_InvalidParameters

You need to set the Steam SDK version numbers here: In Tools -> EOS Plugin -> EOS Configuration -> Steam

image

See here for the documentation.

BestStream commented 5 months ago

@paulhazen Thank you for the answer! But I don't use Steam, I'm trying to build a version for Epic Games. This error looks uncritical (although I will of course try to enter the version as you recommend, just in case). The critical error is below in this place. I can't understand the reason for it.

NullReferenceException: Object reference not set to an instance of an object.
  at PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.MakeLoginOptions (Epic.OnlineServices.Auth.LoginCredentialType loginType, Epic.OnlineServices.ExternalCredentialType externalCredentialType, System.String id, System.String token)
  at PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartLoginWithLoginTypeAndToken (Epic.OnlineServices.Auth.LoginCredentialType loginType, Epic.OnlineServices.ExternalCredentialType externalCredentialType, System.String id, System.String token, PlayEveryWare.EpicOnlineServices.EOSManager+OnAuthLoginCallback onLoginCallback)
  at PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.StartPersistentLogin 
BestStream commented 5 months ago

@paulhazen I added the version and it did not help as expected

The problem is somewhere here. Probably for some reason loadedEOSConfig is null

LoginOptions MakeLoginOptions...
...
                return new LoginOptions
                {
                    Credentials = loginCredentials,
                    ScopeFlags = loadedEOSConfig.authScopeOptionsFlags.Count > 0
                        ? loadedEOSConfig.authScopeOptionsFlagsAsAuthScopeFlags()
                        : defaultScopeFlags
                };
BestStream commented 5 months ago

@paulhazen With help of more logs, I finally found the problem!

Before instantiating of EOSManager, I checked whether the plugin was initialized like this: IsInit() => EOSManager.Instance != null && EOSManager.Instance.GetEOSPlatformInterface() != null

Now I understand that this is not a right way, but for some magical reason it worked in the Editor and Mac builds (IsInit returning false before EOSManager instantiating), but not in the Windows build (IsInit returning truth before EOSManager instantiating)