-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest Build Paths use Mixed Directory Separaters, Fails to Run on Linux #2126
Comments
Same issue here |
|
According to: Path.Combine functions differently on windows vs linux. My problem, I think, is that I'm trying to compile for Linux on my Windows desktop. Given that 1.7.1.0 was compiled and runs perfectly on both platforms, how was that compiled? |
I took a look how the mixed path could come together and found out that |
Yea that file is the source of the problem, I had looked into that and fixed it locally in the past but I guess I never pushed any changes. |
How to fix? |
You replace the \\ with // in the catalog.json, and it just works like that :) |
Are you on the latest version of Nitrox?
Yes, I'm on the latest commit of the repo (only for experts).
Which OS are you playing on?
Windows, Server on Linux
On which platform did you buy Subnautica?
Steam
Describe the issue.
Latest release build (1.7.1.0) of the server runs perfectly on Linux server.
Latest Commit compiles and runs perfectly on Windows, but fails on Linux with specific issue of resource not found.
Looking at the error message, the URI is using both Windows(\) and Unix(/) style directory separators at the same time.
Could not find file "/home/container/subnautica/Subnautica_Data/StreamingAssets/aa\StandaloneWindows64\precursor_bluekeyterminal.prefab_456b318dc62a7e270db6cd7881f6ebea.bundle"
Describe the steps you took to encounter the bug.
Searching the code to find the line that created this string, I found ample usage of Path.Combine, which is apparently an issue as it defaults to Windows directory separators when compiled on windows.
I tried adding a "
.Replace('\\','/')
" to every instance, but it had the same exact issue after that (is there a compiler cache I need to clear after making this code change?).I tried to compile for Linux using "-r linux_x64" but that just keeps failing, asking to run the build tool (which I have also built with the runtime flag).
Is there an easy way to fix the pathing issue for Linux server compilation?
Relevant log output
[11:22:58.310] [INF] Starting NitroxServer Alpha v1.8.0.0 for Subnautica
(System.String[] args) [0x0000c] in :0[11:22:58.660] [INF] Using game files from: /home/container/subnautica
[11:23:01.852] [ERR] Could not find file "/home/container/subnautica/Subnautica_Data/StreamingAssets/aa\StandaloneWindows64\precursor_bluekeyterminal.prefab_456b318dc62a7e270db6cd7881f6ebea.bundle"
System.IO.FileNotFoundException: Could not find file "/home/container/subnautica/Subnautica_Data/StreamingAssets/aa\StandaloneWindows64\precursor_bluekeyterminal.prefab_456b318dc62a7e270db6cd7881f6ebea.bundle"
File name: '/home/container/subnautica/Subnautica_Data/StreamingAssets/aa\StandaloneWindows64\precursor_bluekeyterminal.prefab_456b318dc62a7e270db6cd7881f6ebea.bundle'
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in :0
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
at System.IO.File.OpenRead (System.String path) [0x00000] in :0
at AssetsTools.NET.Extra.AssetsManager.LoadBundleFile (System.String path, System.Boolean unpackIfPacked) [0x00000] in <3d198968416b431196c5f89d3e9caec7>:0
at NitroxServer_Subnautica.Resources.Parsers.PrefabPlaceholderGroupsParser.GetAllPrefabPlaceholdersGroupsFast () [0x00051] in :0
at NitroxServer_Subnautica.Resources.Parsers.PrefabPlaceholderGroupsParser.ParseFile () [0x00013] in :0
at NitroxServer_Subnautica.Resources.ResourceAssetsParser.Parse () [0x00038] in :0
at NitroxServer_Subnautica.SubnauticaServerAutoFacRegistrar.RegisterDependencies (Autofac.ContainerBuilder containerBuilder) [0x0008f] in :0
at NitroxModel.Core.NitroxServiceLocator.InitializeDependencyContainer (NitroxModel.Core.IAutoFacRegistrar[] registrars) [0x0000c] in :0
at NitroxServer_Subnautica.Program.StartServer (System.String[] args) [0x00173] in :0
at NitroxServer_Subnautica.Program.Main (System.String[] args) [0x000ad] in :0
at NitroxServer_Subnautica.Program.
[11:23:06.988] [INF] Starting NitroxServer Alpha v1.8.0.0 for Subnautica
[11:23:07.315] [INF] Using game files from: /home/container/subnautica
The text was updated successfully, but these errors were encountered: