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

Cannot download IPA #6

Closed Tr4sK closed 3 years ago

Tr4sK commented 3 years ago

Describe the bug

Cannot properly download IPA

Steps to reproduce the behavior:

❯ rm enabled/BSIPA -r
❯ 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.6","gameVersion":"1.13.4","authorId":"5ca6a5fe317fa3777c3327cb","uploadDate":"2021-03-13T03:59:36.631Z","updatedDate":"2021-03-13T05:06:56.067Z","author":{"_id":"5ca6a5fe317fa3777c3327cb","username":"DaNike","lastLogin":"2021-03-09T23:00:19.798Z"},"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/604c38a8fd8cd42a0cd12b8f/universal/BSIPA-4.1.6.zip","hashMd5":[{"hash":"b04800b9ff6c5375c5ea6aef078f4d09","file":"IPA.exe"},{"hash":"80318442d34fd71503d6548b2a9f5490","file":"IPA.exe.config"},{"hash":"aa156a789840ef85e6c0fd08b27a18a6","file":"IPA/Data/Managed/I18N.dll"},{"hash":"a75f9881a0e9b61ad1d02bdba0406468","file":"IPA/Data/Managed/I18N.West.dll"},{"hash":"0301b21c6f248b40e8b55d519eefc715","file":"IPA/Data/Managed/IPA.Injector.dll"},{"hash":"66fead2aef2dd6ea8fb62fcb4e1df793","file":"IPA/Data/Managed/IPA.Injector.pdb"},{"hash":"1cc46cbd7c09a82136906255830bf383","file":"IPA/Data/Managed/IPA.Loader.dll"},{"hash":"00c2860e7a5607c550882aad30e39194","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":"a698f41e9f3833562a407edf1b7db66d","file":"IPA/winhttp.dll"}]}],"required":false,"dependencies":[],"_id":"604c38a8fd8cd42a0cd12b8f"}' location: none
Info: Checking integrity of mod 'BSIPA'.
Info: Mod 'BSIPA' passed integrity check.
Debug: md5sum output:
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA.exe: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA.exe.config: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/I18N.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/I18N.West.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Injector.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Injector.pdb: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.pdb: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.xml: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/Microsoft.CSharp.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/Portable.System.ValueTuple.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/System.Runtime.Serialization.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/0Harmony.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Ionic.Zip.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Mdb.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Pdb.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Rocks.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Newtonsoft.Json.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/SemVer.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/winhttp.dll: Réussi
Debug: /IPA
Debug: /IPA/Data
Debug: /IPA/Data/Managed
Debug: /IPA/Data/Managed/I18N.dll
Error: File conflict: /home/tr4sk/.local/share/shaber/enabled/BSIPA/IPA/Data/Managed/I18N.dll
❯ md5sum enabled/BSIPA/IPA/Data/Managed/I18N.dll
aa156a789840ef85e6c0fd08b27a18a6  enabled/BSIPA/IPA/Data/Managed/I18N.dll
❯ ls -la enabled/BSIPA/IPA/Data/Managed/
total 2236
drwxr-xr-x 2 tr4sk tr4sk   4096 21 janv. 14:39 .
drwxr-xr-x 3 tr4sk tr4sk   4096 21 janv. 14:39 ..
-rw-r--r-- 1 tr4sk tr4sk  39424 18 juil.  2019 I18N.dll
-rw-r--r-- 1 tr4sk tr4sk  72192 18 juil.  2019 I18N.West.dll
-rw-r--r-- 1 tr4sk tr4sk  27136 12 mars  21:55 IPA.Injector.dll
-rw-r--r-- 1 tr4sk tr4sk   8988 12 mars  21:55 IPA.Injector.pdb
-rw-r--r-- 1 tr4sk tr4sk 382976 12 mars  21:55 IPA.Loader.dll
-rw-r--r-- 1 tr4sk tr4sk  85204 12 mars  21:55 IPA.Loader.pdb
-rw-r--r-- 1 tr4sk tr4sk 343348 12 mars  21:55 IPA.Loader.xml
-rw-r--r-- 1 tr4sk tr4sk 342528 18 juil.  2019 Microsoft.CSharp.dll
-rw-r--r-- 1 tr4sk tr4sk  30208 29 oct.   2019 Portable.System.ValueTuple.dll
-rw-r--r-- 1 tr4sk tr4sk 933888 18 juil.  2019 System.Runtime.Serialization.dll

System info:

Distro:

❯ uname -a
Linux bluebox 5.11.9-zen1-1-zen #1 ZEN SMP PREEMPT Wed, 24 Mar 2021 18:53:59 +0000 x86_64 GNU/Linux
❯ lsb_release -a
LSB Version:    1.4
Distributor ID: Arch
Description:    Arch Linux
Release:    rolling
Codename:   n/a

Beat Saber version: 1.12.2

ominitay commented 3 years ago

Could you run ls -lh in your Beat Saber directory please?

Tr4sK commented 3 years ago

I tried a month ago with shellsaber without success. So just earlier I decided to have a look and found some closed issue explaining how to download the tool again

drwxr-xr-x 6 tr4sk tr4sk 4,0K 18 mars  16:44 'Beat Saber_Data'
-rwxr-xr-x 1 tr4sk tr4sk 636K  9 mars  15:17 'Beat Saber.exe'
-rw-r--r-- 1 tr4sk tr4sk    6 27 mars  11:55  BeatSaberVersion.txt
drwxr-xr-x 3 tr4sk tr4sk 4,0K 25 févr. 22:25  DLC
drwxr-xr-x 3 tr4sk tr4sk 4,0K  9 mars  19:36 'Incompatible Plugins'
drwxr-xr-x 4 tr4sk tr4sk 4,0K 21 mars  14:30  IPA
lrwxrwxrwx 1 tr4sk tr4sk   53 21 mars  14:30  IPA.exe -> /home/tr4sk/.local/share/shaber/enabled/BSIPA/IPA.exe
lrwxrwxrwx 1 tr4sk tr4sk   60 21 mars  14:30  IPA.exe.config -> /home/tr4sk/.local/share/shaber/enabled/BSIPA/IPA.exe.config
drwxr-xr-x 2 tr4sk tr4sk 4,0K 21 mars  14:33  Libs
drwxr-xr-x 4 tr4sk tr4sk 4,0K 25 févr. 20:55  MonoBleedingEdge
drwxr-xr-x 2 tr4sk tr4sk 4,0K 21 mars  14:37  Plugins
-rwxr-xr-x 1 tr4sk tr4sk 1,1M  9 mars  15:17  UnityCrashHandler64.exe
-rwxr-xr-x 1 tr4sk tr4sk  25M  9 mars  15:17  UnityPlayer.dll
ominitay commented 3 years ago

I see why! You need to rm -r IPA IPA.exe IPA.exe.config. They're probably left behind from a failed install. My time has been eaten up by other things recently, so Shell Saber can't yet check for this or fail cleanly.

Tr4sK commented 3 years ago

Result of a new download

❯ 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.6","gameVersion":"1.13.4","authorId":"5ca6a5fe317fa3777c3327cb","uploadDate":"2021-03-13T03:59:36.631Z","updatedDate":"2021-03-13T05:06:56.067Z","author":{"_id":"5ca6a5fe317fa3777c3327cb","username":"DaNike","lastLogin":"2021-03-09T23:00:19.798Z"},"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/604c38a8fd8cd42a0cd12b8f/universal/BSIPA-4.1.6.zip","hashMd5":[{"hash":"b04800b9ff6c5375c5ea6aef078f4d09","file":"IPA.exe"},{"hash":"80318442d34fd71503d6548b2a9f5490","file":"IPA.exe.config"},{"hash":"aa156a789840ef85e6c0fd08b27a18a6","file":"IPA/Data/Managed/I18N.dll"},{"hash":"a75f9881a0e9b61ad1d02bdba0406468","file":"IPA/Data/Managed/I18N.West.dll"},{"hash":"0301b21c6f248b40e8b55d519eefc715","file":"IPA/Data/Managed/IPA.Injector.dll"},{"hash":"66fead2aef2dd6ea8fb62fcb4e1df793","file":"IPA/Data/Managed/IPA.Injector.pdb"},{"hash":"1cc46cbd7c09a82136906255830bf383","file":"IPA/Data/Managed/IPA.Loader.dll"},{"hash":"00c2860e7a5607c550882aad30e39194","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":"a698f41e9f3833562a407edf1b7db66d","file":"IPA/winhttp.dll"}]}],"required":false,"dependencies":[],"_id":"604c38a8fd8cd42a0cd12b8f"}' location: none
Info: Checking integrity of mod 'BSIPA'.
Info: Mod 'BSIPA' passed integrity check.
Debug: md5sum output:
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA.exe: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA.exe.config: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/I18N.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/I18N.West.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Injector.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Injector.pdb: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.pdb: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.xml: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/Microsoft.CSharp.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/Portable.System.ValueTuple.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/System.Runtime.Serialization.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/0Harmony.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Ionic.Zip.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Mdb.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Pdb.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Rocks.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Newtonsoft.Json.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/SemVer.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/winhttp.dll: Réussi
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
Info: Enabled 'BSIPA'
cat: /home/tr4sk/.local/share/shaber/ipa/version: Aucun fichier ou dossier de ce type
Info: Native Linux IPA is already up-to-date
ominitay commented 3 years ago

Then all worked!

Tr4sK commented 3 years ago

but but :)

❯ shaber i p -V
Debug: Checking dependencies
Debug: All dependencies seem okay
Info: All checks passed, continuing to patch...
/home/tr4sk/.local/bin/shaber: ligne 676: /home/tr4sk/.local/share/shaber/ipa/IPA-Minimal: Aucun fichier ou dossier de ce type
❯ ls -la .local/share/shaber/ipa
total 8
drwxr-xr-x 2 tr4sk tr4sk 4096 21 mars  14:25 .
drwxr-xr-x 7 tr4sk tr4sk 4096 21 mars  14:25 ..
ominitay commented 3 years ago

huh that is curious...

ominitay commented 3 years ago

Perhaps run rmdir .local/share/shaber/ipa. My update logic may be a bit odd...

Tr4sK commented 3 years ago

Thank you for your support. It worked after removing that folder

❯ 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: Downloading native Linux IPA
Info: Native Linux IPA successfully downloaded
Info: Native Linux IPA successfully enabled
❯ shaber i p -V
Debug: Checking dependencies
Debug: All dependencies seem okay
Info: All checks passed, continuing to patch...
Beat Saber.exe,-n,-f,--relativeToPwd
Restoring old version... 
Copying /home/tr4sk/gamez/SteamLibrary/steamapps/common/Beat Saber/winhttp.dll                                                                                                                                      
Info: Beat Saber has been successfully patched with native BSIPA.
ominitay commented 3 years ago

I'll try to modify Shell Saber to handle these cases better :)