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
291 stars 54 forks source link

DllNotFoundException : GfxPluginNativeRender-x64 #278

Closed markossss86 closed 1 year ago

markossss86 commented 1 year ago

Hello,

I am using Unity 2021.3.8 and when I set target to Windows and build from Mac and launch game from epic launcher, got this error even the dll file GfxPluginNativeRender-x64 is in plugins folder in build files.

[Exception] : DllNotFoundException: GfxPluginNativeRender-x64 assembly: type: member:(null) .

How to fix?

andrew-hirata-playeveryware commented 1 year ago

Hello @markossss86, To better help us look into this issue, can you also share the following:

markossss86 commented 1 year ago

@andrew-hirata-playeveryware I m using last version 2.2.1 which installed via git. I am working on Mac, when build target is set to MacOS everyting works fine in UnityEditor and also in Epic Launcher. For macOS in Scripting Define Symbols is added EOS_PREVIEW_PLATFORM.

But, when the target is set on Windows and EOS_PREVIEW_PLATFORM is removed in Unity Editor i got this log:

Trying to load with entry /Users/markostojkovic/Documents/Temp/EpicTest/Library/PackageCache/com.playeveryware.eos@f0969cecb627/Runtime/Windows/x64/EOSSDK-Win64-Shipping.dll

Win32Exception: Searched in : /Users/markostojkovic/Documents/Temp/EpicTest/Assets/Plugins /Users/markostojkovic/Documents/Temp/EpicTest/Library/PackageCache/com.playeveryware.eos@f0969cecb627/Runtime DLLHandle.LoadDynamicLibrary (System.String libraryName) (at Library/PackageCache/com.playeveryware.eos@f0969cecb627/Runtime/DLLHandle.cs:187) PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.LoadDynamicLibrary (System.String libraryName) (at Library/PackageCache/com.playeveryware.eos@f0969cecb627/Runtime/EOSManager_DynamicLoading.cs:193) PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.LoadDelegatesWithEOSBindingAPI () (at Library/PackageCache/com.playeveryware.eos@f0969cecb627/Runtime/EOSManager_DynamicLoading.cs:218) PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.LoadEOSLibraries () (at Library/PackageCache/com.playeveryware.eos@f0969cecb627/Runtime/EOSManager_DynamicLoading.cs:358) PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.Init (PlayEveryWare.EpicOnlineServices.IEOSCoroutineOwner coroutineOwner, System.String configFileName) (at Library/PackageCache/com.playeveryware.eos@f0969cecb627/Runtime/EOSManager.cs:547) PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.Init (PlayEveryWare.EpicOnlineServices.IEOSCoroutineOwner coroutineOwner) (at Library/PackageCache/com.playeveryware.eos@f0969cecb627/Runtime/EOSManager.cs:495) PlayEveryWare.EpicOnlineServices.Samples.EOSHostManager.Awake () (at Assets/Samples/Epic Online Services Plugin for Unity/2.2.1/EOS Plugin for Unity Samples/Scripts/EOSHostManager.cs:48)

When I run that build via Epic Launcher I got this error: [Exception] : DllNotFoundException: GfxPluginNativeRender-x64 assembly: type: member:(null) .

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 7 days with no activity.

DevinWinata commented 1 year ago

Hi, is there any update about this issue? I have the same issue and I'm on windows. Here's some logs from building and running the sample scene:

Failed to load 'D:/EOS/EOS_TEST_Data/Plugins\x86_64/GfxPluginNativeRender-x64.dll', expected x64 architecture, but was Unknown architecture. You must recompile your plugin for x64 architecture.
Failed to load 'D:/EOS/EOS_TEST_Data/Plugins\x86_64/DynamicLibraryLoaderHelper-x64.dll', expected x64 architecture, but was Unknown architecture. You must recompile your plugin for x64 architecture.
...
Start of Early EOS LOG:
Failed to load 'D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/Plugins\x86_64/GfxPluginNativeRender-x64.dll', expected x64 architecture, but was Unknown architecture. You must recompile your plugin for x64 architecture.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
PlayEveryWare.EpicOnlineServices.EOSManager/EOSSingleton:GetEOSPlatformInterface () (at D:/Unity Projects/EOS_3.8_Test/Library/PackageCache/com.playeveryware.eos@ba6536f2c3/Runtime/Core/EOSManager_DynamicLoading.cs:146)
PlayEveryWare.EpicOnlineServices.EOSManager/EOSSingleton:Init (PlayEveryWare.EpicOnlineServices.IEOSCoroutineOwner,string) (at D:/Unity Projects/EOS_3.8_Test/Library/PackageCache/com.playeveryware.eos@ba6536f2c3/Runtime/Core/EOSManager.cs:529)
PlayEveryWare.EpicOnlineServices.EOSManager/EOSSingleton:Init (PlayEveryWare.EpicOnlineServices.IEOSCoroutineOwner) (at D:/Unity Projects/EOS_3.8_Test/Library/PackageCache/com.playeveryware.eos@ba6536f2c3/Runtime/Core/EOSManager.cs:498)
PlayEveryWare.EpicOnlineServices.Samples.EOSHostManager:Awake () (at D:/Unity Projects/EOS_3.8_Test/Assets/Samples/Epic Online Services Plugin for Unity/2.3.0/EOS Plugin for Unity Samples/Scripts/Core/EOSHostManager.cs:49)

[D:/Unity Projects/EOS_3.8_Test/Library/PackageCache/com.playeveryware.eos@ba6536f2c3/Runtime/Core/EOSManager_DynamicLoading.cs line 146]

Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/GfxPluginNativeRender-x64
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/GfxPluginNativeRender-x64.dll
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/GfxPluginNativeRender-x64.dll
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/GfxPluginNativeRender-x64
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/libGfxPluginNativeRender-x64
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/libGfxPluginNativeRender-x64.dll
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/libGfxPluginNativeRender-x64.dll
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/libGfxPluginNativeRender-x64
Failed to load 'D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/Plugins\x86_64/GfxPluginNativeRender-x64.dll', expected x64 architecture, but was Unknown architecture. You must recompile your plugin for x64 architecture.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
PlayEveryWare.EpicOnlineServices.EOSManager/EOSSingleton:GetEOSPlatformInterface () (at D:/Unity Projects/EOS_3.8_Test/Library/PackageCache/com.playeveryware.eos@ba6536f2c3/Runtime/Core/EOSManager_DynamicLoading.cs:146)
PlayEveryWare.EpicOnlineServices.EOSManager/EOSSingleton:Init (PlayEveryWare.EpicOnlineServices.IEOSCoroutineOwner,string) (at D:/Unity Projects/EOS_3.8_Test/Library/PackageCache/com.playeveryware.eos@ba6536f2c3/Runtime/Core/EOSManager.cs:529)
PlayEveryWare.EpicOnlineServices.EOSManager/EOSSingleton:Init (PlayEveryWare.EpicOnlineServices.IEOSCoroutineOwner) (at D:/Unity Projects/EOS_3.8_Test/Library/PackageCache/com.playeveryware.eos@ba6536f2c3/Runtime/Core/EOSManager.cs:498)
PlayEveryWare.EpicOnlineServices.Samples.EOSHostManager:Awake () (at D:/Unity Projects/EOS_3.8_Test/Assets/Samples/Epic Online Services Plugin for Unity/2.3.0/EOS Plugin for Unity Samples/Scripts/Core/EOSHostManager.cs:49)

[D:/Unity Projects/EOS_3.8_Test/Library/PackageCache/com.playeveryware.eos@ba6536f2c3/Runtime/Core/EOSManager_DynamicLoading.cs line 146]

Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/GfxPluginNativeRender-x64
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/GfxPluginNativeRender-x64.dll
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/GfxPluginNativeRender-x64.dll
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/GfxPluginNativeRender-x64
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/libGfxPluginNativeRender-x64
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/libGfxPluginNativeRender-x64.dll
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/libGfxPluginNativeRender-x64.dll
Fallback handler could not load library D:/Unity Projects/EOS_3.8_Test/Builds/EOS_3.8_Test_Data/MonoBleedingEdge/libGfxPluginNativeRender-x64
DllNotFoundException: GfxPluginNativeRender-x64 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.global_log_flush_with_function(intptr)
  at PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.GetEOSPlatformInterface () [0x0003e] in D:\Unity Projects\EOS_3.8_Test\Library\PackageCache\com.playeveryware.eos@ba6536f2c3\Runtime\Core\EOSManager_DynamicLoading.cs:146 
  at PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.Init (PlayEveryWare.EpicOnlineServices.IEOSCoroutineOwner coroutineOwner, System.String configFileName) [0x0002e] in D:\Unity Projects\EOS_3.8_Test\Library\PackageCache\com.playeveryware.eos@ba6536f2c3\Runtime\Core\EOSManager.cs:529 
  at PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.Init (PlayEveryWare.EpicOnlineServices.IEOSCoroutineOwner coroutineOwner) [0x00001] in D:\Unity Projects\EOS_3.8_Test\Library\PackageCache\com.playeveryware.eos@ba6536f2c3\Runtime\Core\EOSManager.cs:498 
  at PlayEveryWare.EpicOnlineServices.Samples.EOSHostManager.Awake () [0x00001] in D:\Unity Projects\EOS_3.8_Test\Assets\Samples\Epic Online Services Plugin for Unity\2.3.0\EOS Plugin for Unity Samples\Scripts\Core\EOSHostManager.cs:49 

(Filename: D:/Unity Projects/EOS_3.8_Test/Library/PackageCache/com.playeveryware.eos@ba6536f2c3/Runtime/Core/EOSManager_DynamicLoading.cs Line: 146)

The files are there, but the file size is suspiciously small (133 bytes). image supplementary info: Platform: Windows 10 Plugin version: 2.3.0 via Git URL Unity: 2021.3.26 and 2021.3.8

jokeruarwentto commented 1 year ago

Bumping it, same problem here using the samples for testing.

arthur740212 commented 1 year ago

Hello and thanks for the reports. The library sizes do look suspicious.

One potential reason is because these libraries are stored in git LFS, initializing git LFS when cloning the repository should fix the problem. Alternatively, head to NativeCode\DynamicLibraryLoaderHelper and rebuild DynamicLibraryLoaderHelper.sln, this will build the libraries needed and place them into the plugin folder. (These assume the user is running from the repo)

When using UPM : If the package is added from the Git URL, git lfs would also be required to grab the stored binaries.

An alternative is to download the latest release tarball, "com.playeveryware.eos-[version].tgz" here.
And add the package in package manager through tarball.

DevinWinata commented 1 year ago

Ah sorry, to clarify I'm using UPM Package via Git URL. I tried to update my Git and Git LFS to latest version from https://git-scm.com/ image And it seems to be working now. image

arthur740212 commented 1 year ago

Thanks for the respond. As this issue came up multiple times within the past week, some investigation was made, and there was a file missing in the UPM repository, which prevented lfs initialization when adding package through git url. The fix should be in the repository now, please re-add the package and check it out.

DevinWinata commented 1 year ago

Ah I see, maybe it's just a coincidence that I re-added the package after the fix was committed. Either way thanks to the team for fixing it 😀