kavezo / ZipZap

48 stars 16 forks source link

Still can't use newest version: older version now breaks as well #61

Open Darkstar0001 opened 1 year ago

Darkstar0001 commented 1 year ago

I previously raised an issue about how ZipZap was crashing any time I attempted to do anything beyond the home screen, so I rolled back to version 0.6 to fix it. Apparently the problem was something to do with labyrinth quests, but it still hasn't been resolved. Now the older version has stopped working, as well, not even loading the server at all, with the error message:

nginx version: nginx/1.19.4
Traceback (most recent call last):
  File "gevent_server.py", line 8, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "d:\0w0\magireco\na_server_flask\zipzap\env\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
  File "app.py", line 18, in <module>
  File "util\homuUtil.py", line 145, in startCron
  File "util\homuUtil.py", line 101, in resetShop
AttributeError: 'datetime.timedelta' object has no attribute 'replace'
[5944] Failed to execute script gevent_server

This seems to have been fixed in the latest version, but everything else breaks for me with that version. Since posting my last issue, I've picked up a bit of Python knowledge, and was going to just try to fix it myself, but the files seem to be bundled in an exe, and are thus locally inaccessible. If you could point me to the offending file in the repository, perhaps I could try fixing it that way, though I don't know how I would test it if the file can't run individually. Any advice?

Alternatively, if this has something to do with my specific userdata (a guess suggested on the previous issue), where would the conflict be, and how could I fix it locally?

boumarca commented 1 year ago

You can take a look at commit 1b3a255 (Fixed reset shop to use beforeToday when checking for expired items. (#53)). It addresses the issue you are having.

Darkstar0001 commented 1 year ago

Firstly, thank you for the quick response. I wasn't expecting it, given how inactive this place has been. Secondly, I am wondering how I can act on the information you provided. As I mentioned, it does not appear to be possible to access or modify homuUtil locally, so there is no way to manually update the file. Replacing the Gevent server exe (which seems to contain the homuUtil) with the one from release 0.6.1 or later leads to the crashing issue I had before. Do you know of anything I can do on my end to avoid these issues?

boumarca commented 1 year ago

You need to clone the repo and build it yourself. This is how I am still running the server on my computer.

I believe you need to install python and run build_all_for_windows.bat. It's been a while since I built the project, so I don't remember if there are more steps to build the server.

Darkstar0001 commented 1 year ago

Ah, okay, thank you. I'll try that, then.

Darkstar0001 commented 1 year ago

So, I downloaded the source code for version 0.6.0, manually replaced the HomuUtil file with the one you linked to, built it with the included "build_all_for_windows.bat", generated a new ca.crt and installed it on the target device, and... it works! There are a few other bugs I noticed, but they might have been fixed in a different commit already, and they aren't nearly as big a deal as the one I was experiencing, so I'm going to mark this one as solved. Thank you again for your assistance.

Darkstar0001 commented 1 year ago

The fixed old version is now crashing with the KeyError like the new version does, and I have no idea why. Is there a way to fix the KeyError? Perhaps I will try downloading the newer version, and building with everything new except the offending file. ...which one would be the offending file in this case?

boumarca commented 1 year ago

I have ben running commit d10e4c6 for a while without any issues. Can you pull, build and see it you still have the issue?

Darkstar0001 commented 1 year ago

Can you pull, build and see it you still have the issue?

I apologize for getting back to you so late. I downloaded and extracted the zip file for that commit, but when I ran "build_all_for_windows.bat" it didn't seem to work. Something happened, but the file structure still looks all wrong compared to the released versions, and none of the files seem to do anything when I click on them (e.g. neither generate_cert.py nor generate_cert.spec generate a certificate when run). Am I doing something wrong? Specifically, it says

File "C:\Program Files\Python310\lib\dis.py", line 292 in _get_const_info
       argval = const_list[const_index]
IndexError: tuple index out of range

Right before the traceback, it says "Analyzing D: \Desktop\ZipZap\gevent_server.py"