meanmedianmoge/zoia_lib

The local storage view under the "Banks" not showing newly downloaded patches.

Closed this issue · 15 comments

Describe the bug
The local storage view under the "Banks" not showing newly downloaded patches.

To Reproduce
Click on "Patch Storage" tab. Download a patch from Patch Storage list. Click on "Banks". The downloaded app does not show in the local storage list until the Librarian is restarted.
Expected behavior
I'd expect the list of patches to show all patches in the local storage, including newly downloaded ones.

Desktop (please complete the following information):

  • OS: Windows 10

I can't seem to replicate this in my testing. Would you happen to know which patch you had downloaded? I'm wondering if maybe it is a specific patch with a weird file extension that could be causing the issue.

Here's a video of a fresh install (no patches) where I try to replicate the steps above (also running Windows 10): https://drive.google.com/file/d/1Pi9NenYZCGjq-Y_88BHllMWDsGB1KZZR/view?usp=sharing

This is the patch which would not show in the local storage unless the Librarian was restarted: https://patchstorage.com/ooh-yaas/ There were other patches which acted the same, but I don’t remember their names. It is true that the behavior is inconsistent, that is that sometimes Librarian works as expected.

What version of the app are you running? That patch in particular downloads and shows in Banks and Local Storage fine for me, should just be a singular binary file.

It’s the latest version I downloaded yesterday here. V1.1

Can you provide a screenshot of the files in this location: C:\Users\user\AppData\Roaming\.ZoiaLibraryApp\? That's the local backend which includes all the necessary files and directories that are referenced when populating the Local and Bank tabs.

All looks pretty normal to me. If you have time to poke around each of those folders, could you identify any that include either a separate directory or a .zip file? Basically it’s expected that those numbered folders will only have .json and .bin files, and anything else will cause the patch to not display due to an error. Getting those numbers (which are unique patch id’s) will help us identify the issue.

So 90% of those folders have a .bin file and a .json file. There are some which have two pairs which I assume are versions of the patch. One folder however has a .zip folder inside and nothing else. It is not possible to unzip it.
Screenshot (490)

Thanks for digging around! Nothing seems out of the ordinary here - the patch id in question leads to this upload: https://patchstorage.com/tesla-tower-tower-delay/, which is a zipped folder that (should) end up de-compressing successfully. It may be possible that it lost connection to the site briefly during the download process? What I would try next is to delete that 125604 directory completely and then try to download the same patch again (or any patch that includes multiple versions uploaded as a zip). If the issue persists, I'll take a look at the de-compression code to make sure there's nothing wonky.

I'm glad to hear the other patches have appeared. We had known about this bug previously, should a patch fail to decompress it can cause some abnormal behaviour in the other views. The problem is now figuring out why the patch did not decompress because that should not have happened in the first place. I suspect meanmedianmoge may have been correct that the connection to the site was interrupted at some point, although that might require a bit more experimentation on our part.

I'm a bit confused about the importing/exporting comment. There's an option to import multiple patches from a folder that is already present in the Librarian and there's also the ability to export individual patches to the slot of your choice. Replacing the entire contents of the SD card isn't required if you want to make a single patch change, you could just export the patch you want to the desired slot from the Local Storage View. That being said, I can still see the benefit of adding what you had suggested, and it may be something we could consider for the next update.

I think I may just be confused though, are you referring to the fact that Banks cannot be imported from an SD card and saved into the Librarian? Something like that may be possible to add as a feature, but the actual implementation of that is a bit more complex than one might expect (what happens if the patches that are a part of a Bank that are being imported already exist in the Librarian? Or if they are modified compared to what exists, so a Version History would need to be created, etc.).

@matreve Glad to hear that deleting the problematic file has shown the other patches!

Couple of notes on your comments:

  • Drag and drop being hit-or-miss is documented here: #93. It's not easy to diagnose, so more reports on when it occurs (step-by-step) would be helpful.
  • There's also my internal monologue about Banks (we're renaming them "Folders" from now on) vs Version Histories and how we might handle them that you can read here as well: #83. Like I say in the ticket and along similar lines as @john-breton mentions.. it's a deceptively complex problem.

We'll take a look at the decompression code to be safe and will close this for now. If it happens again, feel free to re-open.