MCCTeam / Minecraft-Console-Client

Lightweight console for Minecraft chat and automated scripts
https://mccteam.github.io
Other
1.67k stars 402 forks source link

Script error after update #2758

Closed breadbyte closed 4 months ago

breadbyte commented 4 months ago

Discussed in https://github.com/MCCTeam/Minecraft-Console-Client/discussions/2753

Originally posted by **gi-b716** July 5, 2024 I wrote a [script](https://gist.github.com/gi-b716/97a8939d34f5924e31872bfe8cc7ca90) when I was using version 20240415-263. Now I updated to 20240703-271, and the script gave the following error: [![pkRfz28.png](https://s21.ax1x.com/2024/07/05/pkRfz28.png)](https://imgse.com/i/pkRfz28) (Starting from line 16) I can see that Centry is mentioned in the error. I looked through the commit records and found that Sentry was introduced in [this commit](https://github.com/MCCTeam/Minecraft-Console-Client/compare/20240415-263...20240703-271#diff-79c4148fc2039cff2f0709adc7a9e3a9d0697016d13589479f7de7e45a016057). But I think it has nothing to do with my script. What should I do?
breadbyte commented 4 months ago

The issue here is that we cache MCC's executable for the scripting system. When updating the MCC version, the cache is not updated. We just check if the executable already exists in the temp folder, and trying to fetch a new library that didn't exist in the previous version (Sentry in this case), returns an error since it doesn't exist in the cached version.

A temporary fix is to clear the user's temp folder (as that's where MCC's scripting cache is located). Ideally we would re-cache the executable when MCC is updated.