ominitay / shellsaber

!! MAINTENANCE MODE !! ShellSaber is a mod manager written in POSIX-compliant shell script to support Beat Saber modding on Linux.
GNU General Public License v3.0
14 stars 1 forks source link

shaber ipa patch fails #5

Closed businessfish closed 3 years ago

businessfish commented 3 years ago

Describe the bug

shaber ipa patch seems to be expecting the unity data patch and engine files to be in a different location.

Steps to reproduce the behavior:

run shaber ipa patch

Expected behavior:

should properly find the unity files its looking for

Logs:

shaber ipa patch -V
Debug: Checking dependencies
Debug: All dependencies seem okay
Info: All checks passed, continuing to patch...
Beat Saber.exe,-n,-f,--relativeToPwd
DataPath: /data/fish/.local/share/Steam/steamapps/common/Beat Saber/UnityCrashHandler64_Data
EngineFile: /data/fish/.local/share/Steam/steamapps/common/Beat Saber/UnityCrashHandler64_Data/Managed/UnityEngine.CoreModule.dll
ERROR: Game does not seem to be a Unity project. Could not find the libraries to patch.

System info:

Distro: 5.4.89-1-MANJARO Beat Saber version:1.13.2

Additional context:

I tried to go into the script and manually change where it expects those files/directories to be, but it seems like that action takes place in the IPA-Minimal binary, called on line 675: "$ipa_native_dir/IPA-Minimal" "Beat Saber.exe" -n -f --relativeToPwd

It looks like the directory with that engine file in it is /data/fish/.local/share/Steam/steamapps/common/Beat Saber/Beat Saber_Data/ on my machine and not what it expects.

ominitay commented 3 years ago

This seems to be caused outside of ShellSaber, and could be to do with BSIPA-Linux. Could you please send what you have in your ShellSaber config file, and a list of the contents of /data/fish/.local/share/Steam/steamapps/common/Beat Saber so I may see if it could be something on your end?

businessfish commented 3 years ago

ShellSaber config:

cat ~/.local/share/shaber/default/config 
bs_dir="$HOME/.steam/steam/steamapps/common/Beat Saber"
bs_version="1.13.2"

Here's the contents of the directory:

ls -l "/data/fish/.local/share/Steam/steamapps/common/Beat Saber"
total 26972
drwxr-xr-x 6 fish fish     4096 Jan 29 16:19 'Beat Saber_Data'
-rwxr-xr-x 1 fish fish   650752 Jan 29 16:18 'Beat Saber.exe'
-rw-r--r-- 1 fish fish        6 Jan 29 16:19  BeatSaberVersion.txt
drwxr-xr-x 3 fish fish     4096 Jan 29 16:20  IPA
drwxr-xr-x 4 fish fish     4096 Jan 29 16:19  MonoBleedingEdge
-rwxr-xr-x 1 fish fish  1094600 Jan 29 16:18  UnityCrashHandler64.exe
-rwxr-xr-x 1 fish fish 25850312 Jan 29 16:19  UnityPlayer.dll

Also, if the issue is in BSIPA-Linux, what would be the next step to finding a solution?

Thanks for replying so fast!

ominitay commented 3 years ago

As a final check, please could you copy IPA-Minimal from ~/.local/share/shaber/ipa/ to /data/fish/.local/share/Steam/steamapps/common/Beat Saber, cd there, and run ./IPA-Minimal "Beat Saber.exe" -n -f? If that doesn't work, I think that Geefr will be more able to help out, if you can file an issue here :)

businessfish commented 3 years ago

Yep, same error. Thanks for the help, I'll post an issue over there.

ominitay commented 3 years ago

Hold on, you need to set up a config file -- you sent me the default

ominitay commented 3 years ago

Copy the default config file to ~/.config/shaber/config, and change bs_dir="$HOME/.steam/steam/steamapps/common/Beat Saber" to what your Beat Saber directory is, which would be bs_dir="/data/fish/.local/share/Steam/steamapps/common/Beat Saber"

businessfish commented 3 years ago

That actually is the correct directory, when I installed my OS i linked /data and /home to get my home directory on another drive. so $HOME and /data/fish are the same. I'm sure there's a better way to do it, but thats the first thing i tried that worked and it hasn't given me any issues a year or so later. I probably should have mentioned that, but its been a while so I forgot about it.

ominitay commented 3 years ago

Ah that makes sense then. Please do go ahead and file an issue at geefr's repo! I'll keep this one open in case it is my fault :)

ominitay commented 3 years ago

As a quick note, @businessfish, just run shaber i dl to update the Linux IPA build to the working one.

ominitay commented 3 years ago

Reopening because it seems something weird is happening with enabling BSIPA...

businessfish commented 3 years ago

Looks like you say my post on the other issue. After downloading/updating BSIPA with shaber, attempting to do the patch fails like so:

shaber i patch
Info: All checks passed, continuing to patch...
Beat Saber.exe,-n,-f,--relativeToPwd
Restoring old version... 
Installing files... 
ERROR: Oops! This should not have happened.

System.IO.DirectoryNotFoundException: Could not find a part of the path '/data/fish/.local/share/Steam/steamapps/common/Beat Saber/IPA/Data'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
   at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
   at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at System.IO.DirectoryInfo.GetFiles(String searchPattern, EnumerationOptions enumerationOptions)
   at System.IO.DirectoryInfo.GetFiles()
   at IPA.Program.CopyAll(DirectoryInfo source, DirectoryInfo target, Boolean aggressive, BackupUnit backup, Func`3 interceptor, Boolean recurse)
   at IPA.Program.Install(PatchContext context)

I watched the my beat saber folder while it ran, and it successfully created the IPA directory but failed after, I guess.

ominitay commented 3 years ago

Along with sending the logs for shaber i dl -V, please send the output of ls "/data/fish/.local/share/Steam/steamapps/common/Beat Saber". There should be IPA.exe, IPA.exe.config, and IPA.runtimeconfig.json. I'm concerned that ShellSaber isn't symlinking files...

ominitay commented 3 years ago

I don't need the patch log, since that isn't the problem.

businessfish commented 3 years ago
shaber i dl -V
Debug: Checking dependencies
Debug: All dependencies seem okay
Info: Mod 'BSIPA' is up-to-date
Info: BSIPA is already enabled
Info: Native Linux IPA is already up-to-date
ls "/data/fish/.local/share/Steam/steamapps/common/Beat Saber"
'Beat Saber_Data'  'Beat Saber.exe'   BeatSaberVersion.txt   IPA   MonoBleedingEdge   UnityCrashHandler64.exe   UnityPlayer.dll
ominitay commented 3 years ago

You need to run shaber m r BSIPA like I said in the other issue before doing these :)

businessfish commented 3 years ago

shaber m r BSIPA returns this, not sure if its actually removing it or if it never properly installed so theres nothing to remove

shaber m r BSIPA
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/I18N.dll
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/I18N.West.dll
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/IPA.Injector.dll
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/IPA.Injector.pdb
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/IPA.Loader.dll
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/IPA.Loader.pdb
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/IPA.Loader.xml
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/Microsoft.CSharp.dll
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/Portable.System.ValueTuple.dll
Warn: Couldn't find symlink: /home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Data/Managed/System.Runtime.Serialization.dll
mkdir: cannot create directory ‘/home/fish/.steam/steam/steamapps/common/Beat Saber//IPA/Libs’: No such file or directory
ominitay commented 3 years ago

Was never properly installed so it is unhappy. Run rm -r ~/.local/share/shaber/enabled/BSIPA please, then run shaber i dl -V and send me the logs. After that, send the output from ls "/data/fish/.local/share/Steam/steamapps/common/Beat Saber" again.

businessfish commented 3 years ago
shaber i dl -V
Debug: Checking dependencies
Debug: All dependencies seem okay
Info: Searching for dependencies
Debug: Getting data from API for 'BSIPA'
Info: Downloading mod 'BSIPA'
Debug: Mod '{"name":"BSIPA","version":"4.1.4","gameVersion":"1.13.2","authorId":"5ca6a5fe317fa3777c3327cb","uploadDate":"2021-01-22T04:48:03.049Z","updatedDate":"2021-01-22T08:32:58.227Z","author":{"_id":"5ca6a5fe317fa3777c3327cb","username":"DaNike","lastLogin":"2021-01-22T04:45:22.407Z"},"status":"approved","description":"A mod loader for Beat Saber. Provides a number of useful tools and utilities.","link":"https://bsmg.github.io/BeatSaber-IPA-Reloaded/index.html","category":"Core","downloads":[{"type":"universal","url":"/uploads/600a59038384cf2e7ec72582/universal/BSIPA-4.1.4.zip","hashMd5":[{"hash":"9ab95a633c4ba36329cdb85cf8cdca1d","file":"IPA.exe"},{"hash":"80318442d34fd71503d6548b2a9f5490","file":"IPA.exe.config"},{"hash":"42f40b6c1b9ab7f8f92b0ae5d8c5fdab","file":"IPA.runtimeconfig.json"},{"hash":"aa156a789840ef85e6c0fd08b27a18a6","file":"IPA/Data/Managed/I18N.dll"},{"hash":"a75f9881a0e9b61ad1d02bdba0406468","file":"IPA/Data/Managed/I18N.West.dll"},{"hash":"d33174e89ae22442e40a5e989cb1eef1","file":"IPA/Data/Managed/IPA.Injector.dll"},{"hash":"7e12c5fa5ec68b519591a4d8f70ef041","file":"IPA/Data/Managed/IPA.Injector.pdb"},{"hash":"1edcd14a91b710f429ec68373254ac00","file":"IPA/Data/Managed/IPA.Loader.dll"},{"hash":"7199ce0fc46c7c7bb0d1bdc604d9553a","file":"IPA/Data/Managed/IPA.Loader.pdb"},{"hash":"81239733ace6be5dcd86128c5cdf869e","file":"IPA/Data/Managed/IPA.Loader.xml"},{"hash":"a8f13d4df59ebbcae3d07daaeab739af","file":"IPA/Data/Managed/Microsoft.CSharp.dll"},{"hash":"57dd20601187d75a9e367b86e9bc4adf","file":"IPA/Data/Managed/Portable.System.ValueTuple.dll"},{"hash":"c739259c418dad08468a4def4c4d1486","file":"IPA/Data/Managed/System.Runtime.Serialization.dll"},{"hash":"62e3e1bc898295f839fdb64fe4c59eab","file":"IPA/Libs/0Harmony.dll"},{"hash":"6ded8fcbf5f1d9e422b327ca51625e24","file":"IPA/Libs/Ionic.Zip.dll"},{"hash":"bda5cf9930c3bb1976c7484c7f280cba","file":"IPA/Libs/Mono.Cecil.dll"},{"hash":"df8837d3efdaa1405200f529f06f36b1","file":"IPA/Libs/Mono.Cecil.Mdb.dll"},{"hash":"aeff6fb43e6604178e905465463eb546","file":"IPA/Libs/Mono.Cecil.Pdb.dll"},{"hash":"b1de908243feac14049ddeefb858ef33","file":"IPA/Libs/Mono.Cecil.Rocks.dll"},{"hash":"6815034209687816d8cf401877ec8133","file":"IPA/Libs/Newtonsoft.Json.dll"},{"hash":"7581a1faec1b5f935c2c26a4c8ef318c","file":"IPA/Libs/SemVer.dll"},{"hash":"a8e4e34d05051ef2a1a74e5628f5bd6b","file":"IPA/winhttp.dll"}]}],"required":true,"dependencies":[],"_id":"600a59038384cf2e7ec72582"}' location: none
Info: Checking integrity of mod 'BSIPA'.
Info: Mod 'BSIPA' passed integrity check.
Debug: md5sum output:
/home/fish/.local/share/shaber/disabled/BSIPA/IPA.exe: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA.exe.config: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA.runtimeconfig.json: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/I18N.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/I18N.West.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Injector.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Injector.pdb: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.pdb: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.xml: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/Microsoft.CSharp.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/Portable.System.ValueTuple.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/System.Runtime.Serialization.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Libs/0Harmony.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Libs/Ionic.Zip.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Mdb.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Pdb.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Rocks.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Libs/Newtonsoft.Json.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/Libs/SemVer.dll: OK
/home/fish/.local/share/shaber/disabled/BSIPA/IPA/winhttp.dll: OK
Debug: /IPA
Debug: /IPA/Data
Debug: /IPA/Data/Managed
Debug: /IPA/Data/Managed/I18N.dll
Debug: /IPA/Data/Managed/I18N.West.dll
Debug: /IPA/Data/Managed/IPA.Injector.dll
Debug: /IPA/Data/Managed/IPA.Injector.pdb
Debug: /IPA/Data/Managed/IPA.Loader.dll
Debug: /IPA/Data/Managed/IPA.Loader.pdb
Debug: /IPA/Data/Managed/IPA.Loader.xml
Debug: /IPA/Data/Managed/Microsoft.CSharp.dll
Debug: /IPA/Data/Managed/Portable.System.ValueTuple.dll
Debug: /IPA/Data/Managed/System.Runtime.Serialization.dll
Debug: /IPA/Libs
Debug: /IPA/Libs/0Harmony.dll
Debug: /IPA/Libs/Ionic.Zip.dll
Debug: /IPA/Libs/Mono.Cecil.dll
Debug: /IPA/Libs/Mono.Cecil.Mdb.dll
Debug: /IPA/Libs/Mono.Cecil.Pdb.dll
Debug: /IPA/Libs/Mono.Cecil.Rocks.dll
Debug: /IPA/Libs/Newtonsoft.Json.dll
Debug: /IPA/Libs/SemVer.dll
Debug: /IPA/winhttp.dll
Debug: /IPA.exe
Debug: /IPA.exe.config
Debug: /IPA.runtimeconfig.json
Info: Enabled 'BSIPA'
Info: Native Linux IPA is already up-to-date
ls "/data/fish/.local/share/Steam/steamapps/common/Beat Saber"
'Beat Saber_Data'   BeatSaberVersion.txt   IPA.exe          IPA.runtimeconfig.json   UnityCrashHandler64.exe
'Beat Saber.exe'    IPA                    IPA.exe.config   MonoBleedingEdge         UnityPlayer.dll

Looks like that might have done it

ominitay commented 3 years ago

That's all gone well now! I'm very confused as to how it ended up broken in the first place... Perhaps you had the directory incorrectly set the first time around? There's not really anything more I can do to prevent this, since we don't know how to reproduce it. You should have a fully patched Beat Saber install now :) Please make sure to post a new issue if you encounter any more bugs. I'm also frequently updating ShellSaber, so make sure to watch this repo or regularly check back for updates!

businessfish commented 3 years ago

Thank you! I'm pretty sure that I'm just an idiot and deleted that directory at some point in an effort to reinstall it from a clean slate. So maybe not a bug but more of an idiot-proofing issue

ominitay commented 3 years ago

Haha! I will be working out how to make the script handle that sort of issue when removing and disabling so as to not error out, but I can't really do much to stop people from deleting their Beat Saber directory...