unitycoder / UnityLauncherPro

Unity Hub Alternative Project Launcher with time saving features!
MIT License
491 stars 56 forks source link

Latest automatic release crashes on launch #170

Closed Legi428 closed 2 weeks ago

Legi428 commented 3 weeks ago

Hello,

I tried using the latest release that was automatically created. I unpacked the exe like I did with previous versions but it stopped launching (don't even see a window open up). So I tried out some things and figured out that the 'System.Text.Json.dll' is missing. Once I put that into the folder where the .exe is it starts working like before. I assume it's not part of every system so it's missing. Maybe it should either be in the resulting zip archive or embedded in the exe directly. I assume this comes from the changes I made that started including this nuget package. I'm using the dll version 8.0.5

unitycoder commented 3 weeks ago

ah ok, i removed the broken build now.

Could be also from upgrading the github action, there was some automatic github version bump for that dll. Would be nice to have with embedded, so that the app is single exe.

ill check also.

unitycoder commented 3 weeks ago

ok yeah, previously i didnt have any nuget packages.. i'm wondering, can they be embedded somehow?

Legi428 commented 3 weeks ago

I am not too much of an expert in that area. I found this gist which makes it look pretty straight forward. Basically embedding referenced dlls when the project is built: https://gist.github.com/x1unix/7bced85295bb3fbc21a7308bf541e2b8

unitycoder commented 3 weeks ago

Didn't seem to work on few tests, tried some selfcontained builds also (but using 4.8 is also limiting factor it seems..)

I think ideally, since the system.text.json is only used for parsing those few files, could replace it with parsing json manually (so can remove all nugets).

I'll do some tests if it works, or if you have better ideas!

unitycoder commented 3 weeks ago

added test branch for no nugets, manual json parsing^

still need to clean it up and test.. but i think it could work fine!

Legi428 commented 3 weeks ago

Even better. Glad it worked out so quickly. I have this issue (with the version I built from the faulty version where I added the dll to make it work) on my end that makes it so clicking the Updates tab just crashes the app. Have you experienced something similar?

unitycoder commented 3 weeks ago

i didnt have that, but i think i was using locally build version.. Now updated the branch, should be working.. will merge soon. (there is some duplicated code for manual json parsing still though, but it works : )

unitycoder commented 2 weeks ago

merged to master, will make build sometime on weekend.

If you happen to have few minutes, try the latest commits on our end too.

I had to make some last minute changes for the fetchall, it missed some releases (since lastarchived version would early exit, since unity api results are not in order?, it missed a3 alpha or others in between.. could be from my modifications earlier)

Legi428 commented 2 weeks ago

Okay I have debugged the crash I had and it was from a dll that was missing. The app tried to deserialize the result for the async fetch which required "System.Threading.Tasks.Extensions". But I didn't have that dll in my separate folder. It doesn't happen with the latest master. The a3 alpha is strange. It seems like it was releases less than 24 hours after a2. They're all visible now though.

unitycoder commented 2 weeks ago

noticed one possible bug related to it, now its not sorted by date, since some of those versions appear later into that list? image

although its not really bug, since it wasnt visible back then.. so maybe not an issue now.

Next cool thing™ would be to run script on my server, to fetch these results: https://t.me/s/unity_news?q=%23releases and push the links into some github file/gist and have option in launcher to fetch "unofficial releases list"..

Legi428 commented 2 weeks ago

grafik That's strange. On my end it is not sorted incorrectly.

unitycoder commented 2 weeks ago

ah ok thats good, maybe the list got messed up when i was updating the fetcher.

unitycoder commented 2 weeks ago

latest build is available