Using a Ruse base and have been experiencing this issue since day 1.
When I upload my new cache (Ensuring the correct permissions etc) then the client always fails to unzip it correctly.
I believe that it is checking for files in the cache folder, before it has finished unzipping - I have tried to resolve this myself and spent hours looking up the issue, but I cannot work it out.
Now whenever I update my Cache, the CacheVersion.dat file automatically updates itself based on Bytes in the Zip.
(See error below)
In the error, you'll notice that it's trying to find the /achievement/ folder... That is present, please don't tell me to add that folder.
To confirm, I have done the following;
Ensured Cache is zipped, not the cache folder
Ensured the correct file permissions exist on my FTP server
Tested by unzipping the cache manually - Client now loads
Thank you in advance,
Disc: Flub#3610
EDIT:
As per Kevin's post, here is my CacheDownloader.java
public long getNewestVersion() {
try {
return ((HttpURLConnection) new URL(ZIP_URL).openConnection()).getContentLengthLong();
} catch (Exception e) {
handleException(e);
return -1;
}
}
private void handleException(Exception e) {
StringBuffer strBuff = new StringBuffer();
strBuff.append("Please Screenshot this message, and send it to an admin!\r\n\r\n");
strBuff.append(e.getClass().getName() + " \"" + e.getMessage() + "\"\r\n");
for (StackTraceElement s : e.getStackTrace()) {
strBuff.append(s.toString() + "\r\n");
}
ZipInputStream zin = new ZipInputStream(new BufferedInputStream(new FileInputStream(zipFile)));
ZipEntry e;
long max = 0;
long curr = 0;
while ((e = zin.getNextEntry()) != null) {
max += e.getSize();
}
zin.close();
ZipInputStream in = new ZipInputStream(new BufferedInputStream(new FileInputStream(zipFile)));
while ((e = in.getNextEntry()) != null) {
if (e.isDirectory()) {
new File(outFile, e.getName()).mkdirs();
} else {
FileOutputStream out = new FileOutputStream(new File(outFile, e.getName()));
public class GUI extends JFrame {
private static final long serialVersionUID = 1L;
/** Creates new form GUI */
public GUI() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception ignored) {
}
initComponents();
}
/**
* This method is called from within the constructor to initialize the
* form. WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() {
jProgressBar1 = new JProgressBar();
jLabel1 = new JLabel();
jLabel2 = new JLabel();
jLabel3 = new JLabel();
Um I finally fixed this after ripping my hair out... Turns out that using WinRar to zip the files instead of "File->Send To Compressed zip" actually works......
04-30-2020, 10:09 AM
Kevy
In order for people to be able to help you should post some code also :)
Please paste the code for the cache unzipping class, also make sure it includes the code that handles CacheVersion.dat.
Thanks, Kevin.
04-30-2020, 10:31 AM
Flub
Quote:
Originally Posted by Kevy
In order for people to be able to help you should post some code also :)
Please paste the code for the cache unzipping class, also make sure it includes the code that handles CacheVersion.dat.
Thanks, Kevin.
Thanks for pointing that out Kevin, updated accordingly :yay:
04-30-2020, 12:23 PM
opions
Hey bro add my on discord ill give you a hand caches, can be annoying at times,