phoenixlzx / mochimochi

Simple Asset Management
MIT License
7 stars 0 forks source link

Numerous errors on fresh launch #1

Closed mangoplane closed 1 year ago

mangoplane commented 1 year ago

Hi,

First of all, a massive thanks. I've been soul searching for a tool like this for ages. I managed to get it working after a bunch of tweaks that were mostly zero effort, I see it's still a work in progress.

I encourage you to test it on a fresh install with no data folder for one. It will probably complain about a missing file. And other issues to do with the manifest not populating correctly.

Kind regards.

phoenixlzx commented 1 year ago

Hi there, I haven't finish this yet. Please wait a while for a working version.

phoenixlzx commented 1 year ago

That being said, if you don't need the server / webpage part, the CLI tool should be working.

It will be a great help if you can provide more details on manifest not populating correctly.

mangoplane commented 1 year ago

I'll see if I can reproduce it with your changes.

I also see you're using vanilla Javascript. I believe Typescript by its very nature will help you root out issues to do with invalid types and accidental typos.

Actually I have a fork on my computer that converted it to TS, and doing that I immediately found a few errors that weren't just linting and I resolved these.

Thanks 👍

mangoplane commented 1 year ago

Will test it with the provided config example and let you know issues I find.

mangoplane commented 1 year ago

Huge improvement since last time. Only error I encountered was:

Error downloading from https://fastly-download.epicgames.com/Builds/UE5/Releases/CloudDir/HiUKZBuBCKKVVYuuQ0SLQo1I8dGHaA.manifest?f_token=1689040513_f2....: SyntaxError: Unexpected token
 in JSON at position 0
phoenixlzx commented 1 year ago

I just pushed updates trying to address this issue.

It seems the servers return everything as text/plain and I haven't figured out why it enters response.ok even it's apparently a 403. Thus I can only try catch the JSON parse error, and if all given URLs failed, return empty object and do checks at the following logic.

Ref: #L242

phoenixlzx commented 1 year ago

I consider the current version is fully working with a simple API server and frontend web page.

Please open new issue if you have other problems 😃