Skip to content

Latest automatic release crashes on launch #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Legi428 opened this issue Nov 1, 2024 · 13 comments
Closed

Latest automatic release crashes on launch #170

Legi428 opened this issue Nov 1, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@Legi428
Copy link
Contributor

Legi428 commented Nov 1, 2024

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
Copy link
Owner

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 unitycoder added the bug Something isn't working label Nov 1, 2024
@unitycoder
Copy link
Owner

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

@Legi428
Copy link
Contributor Author

Legi428 commented Nov 1, 2024

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Contributor Author

Legi428 commented Nov 4, 2024

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
Copy link
Owner

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 added a commit that referenced this issue Nov 8, 2024
* atenuggets:
  handle missing releases, comparing batches to all cached versions (since releases api is not in order)
  alpha release notes for 2023.3 and later fixes #31
  add full installer exe download option to DownloadInBrowser(), add await for extract urls (got stuck otherwise),
  fix converter issue (in design time),
  test build without nugets (system.text.json and others) ref #170
@unitycoder
Copy link
Owner

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
Copy link
Contributor Author

Legi428 commented Nov 11, 2024

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
Copy link
Owner

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
Copy link
Contributor Author

Legi428 commented Nov 11, 2024

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

@unitycoder
Copy link
Owner

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

@unitycoder
Copy link
Owner

latest build is available

unitycoder added a commit that referenced this issue Nov 25, 2024
* master: (54 commits)
  add default unity hub editors installation folder, fixes #112
  now can use custom icon (place icon.ico into same folder as exe) fixes #127
  Use IPC pipe messages to restore existing tray minimized instance, fixes #67
  cancel edit cell if exit unity, fixes #176
  update release cache json, #GITBUILD
  add statusbar messagetypes & colors, show error message if new project root folder is missing (on new project creation) #175
  Update README.md
  #GITBUILD
  display error message if install APK fails, add option to capture output from LaunchExe
  handle missing releases, comparing batches to all cached versions (since releases api is not in order)
  alpha release notes for 2023.3 and later fixes #31
  add full installer exe download option to DownloadInBrowser(), add await for extract urls (got stuck otherwise),
  fix converter issue (in design time),
  test build without nugets (system.text.json and others) ref #170
  Update main.yml test5 #GITBUILD
  Update main.yml test4 #GITBUILD
  Update main.yml test3 #GITBUILD
  Update README.md test2 #GITBUILD
  Update main.yml test #GITBUILD
  Update README.md #GITBUILD
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants