chilli-axe / mpc-autofill

Print automation software (leveraging MakePlayingCards) for your tabletop gaming community
https://mpcautofill.github.io
GNU General Public License v3.0
206 stars 93 forks source link

Inserting the image stalls at random cards. #227

Closed dperremans closed 1 month ago

dperremans commented 5 months ago

System

Affected Components

Description

I've added a new cards.xml file to the same folder as the autofill-macos tool. When uploading the tools gets stuck at random cards. Sometimes it upload to 80% and then stalls, so I have to terminate the process. And then other times, it uploads to 25%, ... I've tried it 5 times, but still the same issue.

The images are all downloaded. So I don't need to go through that process again.

The XML file is added to this issue. I've added it in a ZIP file.

Steps to Reproduce

cards.zip

dperremans commented 5 months ago

I've found the solution for my issue:

My guess is that there went something wrong while downloading the images. Maybe corrupt images?

Moss-CG commented 2 months ago

I am running in to this same issue and despite re-downloading images it never works and continually gets stuck on the 6th and 7th cards. image cards (3).zip

dennisperremans commented 2 months ago

@Moss-CG Have do you have the latest version of the tool? And have you delete the cards folder itself? That worked for me. I have no problems on Windows or iOS

jethrogb commented 2 months ago

Same issue on Linux

ndepaola commented 2 months ago

a few people on discord have reported that refreshing the page when this happens can resolve it - could you guys try that next time it happens and report back?

jethrogb commented 2 months ago

I tried that. It sometimes continued with the next card, but the "current" card is then not properly inserted.

Running from git source instead of the released binary solved it for me.

joaobarcia commented 1 month ago

I have experienced the exact same bug on linux, also with inserting into slot 7.

Reloading the page unstuck the process. The image for slot 7 was missing, but that was easy enough to add manually :)

Thanks for the amazing tool and let me know if I can provide any information that might help further debug the issue.

nhiebert1776 commented 1 month ago

Same issue for me with with the windows tool. Stalls trying to insert into slot 7. I used the most recent version of the tool as well as an old version I had saved from past uploads. I've used successfully many times in the past. Tried from two different browsers as well as two different computers. Tried deleting the card that initially was getting stuck from the xml but it would just get stuck on a new card, around slot 7. The one thing I noticed is that it was trying to insert this card shortly after the first save of the project on makeplayingcards.com browser window. That initial save seems to take a hair longer than the subsequent saves and I wonder if the tool just isn't waiting long enough for that first save to complete before attempting to continue. A refresh of the browser got it going again and I had to manually add the 1 skipped image.

raphabenoi commented 1 month ago

I'm having the same issue — also on MacOS. I have to refresh every couple minutes as it fails to insert images "relatively" frequently, e.g. 17 times out of 372 cards project. So on average about every 20 cards but sometimes they are just a few cards apart and then it's fine again for a bigger batch :D

Needless to say, this tool is still absolutely amazing and I'm very thankful for its existence!

EDIT: I've payed a bit more attention as to when the problem occurs. What's interesting for me, is that is only happens in increments of 5. Right now I'm getting an insert stall every 5-15 cards. It's becoming a bit difficult to get through a full 612 cards project this way. I'm pretty sure it's connected to the project saving. It struggles with the cards that come next.

ndepaola commented 1 month ago

thanks for the detailed error reports - a few people have reported this issue on discord over the last week too. i haven't been able to reproduce this reliably, but when i have, it seems the entire MPC frontend locks up after the tool saves the project - the grey loading overlay is visible and no UI elements can be interacted with. it seems like this is down to a code change MPC pushed to their site recently

could you @nhiebert1776 @raphabenoi run the tool with the command line arg --debug-logs, then when the tool freezes like this, upload the debug log file autofill_log.txt here? 🙏

atm i'm looking at resolving this by detecting when the MPC frontend has locked up while processing a change & refreshing the page before proceeding

raphabenoi commented 1 month ago

I haven't had the chance to run it again with --debug-loggs but I "successfully" managed to upload almost all images without errors by just saying NO to the question on auto saving when initializing.

ndepaola commented 1 month ago

i have a fix going for this locally - just testing it a little more before pushing. will create a new release with this fix when it's ready