GlowPuff / ImperialCommander2

A companion app for the Imperial Assault board game.
MIT License
87 stars 12 forks source link

Error when loading custom campaigns on Mac #96

Open Noldorion opened 2 months ago

Noldorion commented 2 months ago

See here: https://boardgamegeek.com/thread/2611941/article/44504691#44504691

And here: https://boardgamegeek.com/thread/2611941/article/44509357#44509357

grafik

I deleted the app along with all the files and reinstalled it. I downloaded the Lost without a Trace zip file and put it in the CustomCampaigns folder. I selected start new campaign, imported Lost without a Trace, selected my heroes and click the arrow to start the first mission. That's when I got the error. This is the error I got this time:

grafik

Here is the text from the error log:

07/03/2024 08:59:32 :: ERROR TRACE: LoadCampaignPackage()::Error loading the Campaign Package [/Users/User/ImperialCommander/CustomCampaigns/.DS_Store]. End of Central Directory record could not be found.

07/03/2024 08:59:36 :: ERROR TRACE: LoadCampaignPackage()::Error loading the Campaign Package [/Users/User/ImperialCommander/CustomCampaigns/.DS_Store]. End of Central Directory record could not be found.

07/03/2024 08:59:36 :: ERROR TRACE: LoadCampaignPackage()::Error loading the Campaign Package [/Users/User/ImperialCommander/CustomCampaigns/.DS_Store]. End of Central Directory record could not be found.

07/03/2024 08:59:36 :: ERROR TRACE: LoadCampaignPackage()::Error loading the Campaign Package [/Users/User/ImperialCommander/CustomCampaigns/Bonus Campaign 02 - Lost Without Trace.zip]. Unexpected character encountered while parsing value: . Path '', line 1, position 1.

07/03/2024 08:59:48 :: ERROR TRACE: LoadCampaignPackage()::Error loading the Campaign Package [/Users/User/ImperialCommander/CustomCampaigns/.DS_Store]. End of Central Directory record could not be found.

07/03/2024 08:59:48 :: ERROR TRACE: LoadCampaignPackage()::Error loading the Campaign Package [/Users/User/ImperialCommander/CustomCampaigns/Bonus Campaign 02 - Lost Without Trace.zip]. Unexpected character encountered while parsing value: . Path '', line 1, position 1.

GlowPuff commented 1 month ago

Could you attach the zip file for the campaign you are using? I've tried different angles here, and I just can't reproduce this issue. I even added a .DS_Store file to my folder, as well as inside the zip itself. The app always handles that file just fine.

GlowPuff commented 1 month ago

I've made a special MacOS build for you to try: https://drive.google.com/file/d/12RHENCA9HJhRuC5s701qwvw_3oR...

This build doesn't fix anything, but I added detailed error checking and reporting in the LoadCampaignPackage() function, which is where it's having a problem. Any problems that arise will now be logged with more detail, instead of just "Unexpected character encountered", which is a JSON deserializing error. It will now report more specific information, and the actual file inside the zip that is failing.