manyfold3d / manyfold

A self-hosted digital asset manager for 3d print files.
https://manyfold.app
MIT License
708 stars 45 forks source link

Multiple copies of model and files after uploading thingverse zip #2761

Open marl-scot opened 1 day ago

marl-scot commented 1 day ago

Describe the bug Downloaded a model zip file from thingverse (#6743080), uploaded the model to a fresh install of Manyfold. Zip file contains 10 files over 2 folders (2 files are STLs, rest are images/readme/license)

To Reproduce Steps to reproduce the behavior:

  1. Download thingverse model (6743080) zip file
  2. Upload to Manyfold
  3. Manyfold displays multiple models of the same file
  4. 'Files' in advanced settings, showed 55 files, just checked and this is now at 66!

Expected behavior Have 2 models grouped together.

Using Manyfold on Docker (https://manyfold.app/get-started/docker) fresh install (23 Sept 2024) multiuser setup, no other files uploaded.

Is this something to do with uploading a ZIP file? Or did I do something really stupid? If you need any more info, let me know and I will provide it.

Floppy commented 1 day ago

Just done the same on my instance, and it's worked OK; I've made some changes to the uploading and fixed some bugs in the release that's coming out hopefully tomorrow, so bear with me and hopefully the problem will go away.

Are the files in both the models that appeared? Or is one empty? Because if it's empty, I know I've fixed that one :)

marl-scot commented 1 day ago

All files appear to be in all models. I am now seeing 88 files (under the advanced settings 'Files') and 8 models. Thats without touching the site since my initial bug post! :) So it looks almost like something is re-indexing the files and counting them as new each time?? Each of the models are separate items, as i set a cover display for one and I only see the one with a cover image.

marl-scot commented 1 day ago

Could this be permission issues or something?

Floppy commented 20 hours ago

OK, it's probably because the unzipping is failing for some reason and retrying... but I fixed a problem with that ages ago, I thought. If you go into the activity page and press the Sidekiq button, do you see any jobs in the "retries" section, and do they have any useful error messages on them?

marl-scot commented 19 hours ago

Hi James, Nothing listed in the retries section. It is showing : 60 processed 9 filed rest 0 Under failures tab, i have the following errors : Errno::ENOENT: No such file or directory @ rb_file_s_rename - (/usr/src/app/tmp/cache/.rails-settings-cached2Fv120240923-143-yyf4ng, /usr/src/app/tmp/cache/983/850/rails-settings-cached%2Fv1) Processor: 4bfab3eb6ee0:143

Errno::EACCES: Permission denied @ dir_s_mkdir - @.*** Processor: 4bfab3eb6ee0:143

Not sure if the permission error occurred before i reset the library folder permissions. but i do know the /libraries folder was set to 777 before i submitted the bug, could an inital permission failure have a knockon affect? would i be better wiping everything and just starting from scratch?

Thanks

On Tue, 24 Sept 2024 at 08:10, James Smith @.***> wrote:

OK, it's probably because the unzipping is failing for some reason and retrying... but I fixed a problem with that ages ago, I thought. If you go into the activity page and press the Sidekiq button, do you see any jobs in the "retries" section, and do they have any useful error messages on them?

— Reply to this email directly, view it on GitHub https://github.com/manyfold3d/manyfold/issues/2761#issuecomment-2370374825, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABM3ODFXNN33LQNPTQFIXRTZYEF7LAVCNFSM6AAAAABOW5LNLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZQGM3TIOBSGU . You are receiving this because you authored the thread.Message ID: @.***>

Floppy commented 16 hours ago

It could have had a knockon effect, yes, and if you've changed permissions, that could fix it so it's eventually stopped adding more duplicates.

Probably no need to wipe everything, but just delete the bad stuff and have another go at uploading now your permissions are known good, and see if it recurs.

There are some fixes for retries in v0.80.0 so hopefully this won't happen in the future once that's released.

Floppy commented 11 hours ago

v0.80.0 is out now :+1:

marl-scot commented 5 hours ago

Hi, Got back this evening and my model had managed to duplicate itself 9 times in total. What i did realize was even after setting the permissions on the folder, NO files were created until iteration 9! So I deleted all the models, upgraded to 0.80.0 and added the same zip file again and all worked great. Would it be an idea to have a highlighted banner on the upload page (or even disable upload) if the filesystem is not writable?