shdwmtr / millennium

Apply themes/skins/customize Steam® after the 2023-04-27 Chromium UI update
https://steambrew.app
MIT License
1.09k stars 19 forks source link

[Bug] Millennium requires opening up Steam twice to start successfully #149

Closed Jonius7 closed 5 days ago

Jonius7 commented 1 week ago

Before Reporting

Describe the Bug

Been using v2.12.4 for a while and I find I need to start up Steam twice for it to open properly as the first time it crashes or doesn't show any Steam windows.

Below is the -dev console when Steam is run for the first time, something about a Promise already satisfied

2024-10-28 17_24_32-Millennium@v2 12 4

Expected Behavior

Start up Steam See login screen and then Steam window the first time

Steps To Reproduce

Windows 11, with Inject JavaScript and Inject StyleSheets enabled, and these themes/skins:

Operating System

Windows

Anything else?

No response

shdwmtr commented 1 week ago

I've seemingly fixed this, it will be in the latest update. Steam added something in the newest beta that causes this. I'll leave this open until I'm confident its fixed.

NathanL1370 commented 1 week ago

I can confirm I am having this issue too. This is also occurring occasionally on the stable branch, and it can also happen with the default theme.

shdwmtr commented 1 week ago

@NathanL1370 @Jonius7

Try using this version, see if it fixes it. https://nightly.link/SteamClientHomebrew/Millennium/actions/runs/11566730508

Extract the files in your steam folder and replace all (make sure Steam is closed) built from source here

NathanL1370 commented 1 week ago

Seems like it's fixed after trying the version from the nightly link. Restarts also seem to work properly now, including the default and other themes.

shdwmtr commented 1 week ago

Perfect; after some more slight bug testing I'll release that version. You can use that version as normal in the time being ofc.

YCZ01111 commented 6 days ago

I found that after starting Windows for a period of time, Steam can start successfully in one go. If you run Steam right after starting Windows, you will need to run it twice.

shdwmtr commented 6 days ago

Fixed in the latest release!

YCZ01111 commented 5 days ago

I have updated to 2.13.0, but there is still this issue

NathanL1370 commented 5 days ago

Issue is still happening after updating to 2.13.0 on Windows. Uninstalling and reinstalling Millennium does not fix the issue; now Steam won't start up at all, nor will it appear in my system tray. It briefly shows up in task manager, but then quits itself after about ~20 seconds.

shdwmtr commented 5 days ago

@NathanL1370 start steam with -dev and share the console output. Btw I thought you said the nightly link fixed your issue?

shdwmtr commented 5 days ago

@YCZ01111 @NathanL1370 give this a try. Just extract and replace in the steam folder https://github.com/SteamClientHomebrew/Millennium/actions/runs/11648759524

NathanL1370 commented 5 days ago

@NathanL1370 start steam with -dev and share the console output. Btw I thought you said the nightly link fixed your issue?

Screenshot 2024-11-02 222904

Console output now throws a system error in v2.13.0, with the what() function saying that a resource is temporarily unavailable. The nightly link didn't have this problem. But now it is, in v2.13.0.

NathanL1370 commented 5 days ago

@shdwmtr Forgot to include this screenshot, but when I tried using your compiled version of Millennium, the console output warns that it's "upgrading" from 2.13.1 to 2.13.0, which still has the bug. (Technically, wouldn't it be downgrading in this case?) Steam was started with -dev. Screenshot 2024-11-02 223941

shdwmtr commented 5 days ago

Ah oopsies, it's downloading the live version. Set check_for_updates to no in C:\Program Files (x86)\Steam\ext\millennium.ini for testing (and revert back when necessary). Then install the build above

NathanL1370 commented 5 days ago

Trying again with 3 launch attempts, console still throws std::system_error. Screenshot 2024-11-02 231030 Screenshot 2024-11-02 231049 Screenshot 2024-11-02 231116

shdwmtr commented 5 days ago

I seem to be able to reproduce it, its because you have a large amount of files in your steamui folder in steam that slows down Millenniums start process resulting in a race condition. Where it says connected to SharedJSContext in 7000 ms it should be 1-2 ms

shdwmtr commented 5 days ago

It seems I wasn't properly freeing a thread. This should fix it https://github.com/SteamClientHomebrew/Millennium/actions/runs/11654025051

NathanL1370 commented 5 days ago

I seem to be able to reproduce it, its because you have a large amount of files in your steamui folder in steam that slows down Millenniums start process resulting in a race condition. Where it says connected to SharedJSContext in 7000 ms it should be 1-2 ms

That was my actual issue upon further inspection in my steamui folder, it seems I had a bunch of skin backup folders that were probably created in a very old version of Millennium.

NathanL1370 commented 5 days ago

Seems to be working now after trying your hotfixed version. Console output also reports that the UI has loaded successfully as well. Restarts are working properly as it should. Screenshot 2024-11-03 113127

shdwmtr commented 5 days ago

try restoring those files to see if it works even with them in there now (if you havent deleted them permanently)

NathanL1370 commented 5 days ago

try restoring those files to see if it works even with them in there now (if you havent deleted them permanently)

Seems like it still works, it's just that Steam will end up taking longer to start with the files still present.

Before: Screenshot 2024-11-03 114321 After: Screenshot 2024-11-03 114408

shdwmtr commented 5 days ago

Perfect! I plan to move skins outside of the steamui folder in the future because Steam pre-caches everything in the folder which takes a long time (happens with or without Millennium), but that's an issue for another time.