UWPHook icon indicating copy to clipboard operation
UWPHook copied to clipboard

Can't access games in Windows 11 pro 24h2

Open manituu opened this issue 1 year ago • 31 comments

Hi there, since i updated to 24h2 (release canditate channel) UWPHook can't read the installed apps.

On startup (and if i click on reload app list) there is an error coming up [ERR] Error trying to get installed apps on your PC Die Datei oder Assembly "System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.

The message says: The file or assembly "System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" or a dependency was not found. The system can't find the choosen file.

If I can do anything to help you debug this just let me know.

manituu avatar Jun 10 '24 18:06 manituu

Yep, I get the same error when openning UWHook. image

Mohammad-Alavi avatar Jun 11 '24 17:06 Mohammad-Alavi

same here image

whzzz avatar Jul 27 '24 02:07 whzzz

same

LifeDreamer24 avatar Aug 15 '24 19:08 LifeDreamer24

image Same

Maqiic avatar Sep 01 '24 15:09 Maqiic

Same here : image

CobKurtain avatar Sep 09 '24 06:09 CobKurtain

Getting the same error: image image

forebodingburger avatar Sep 22 '24 12:09 forebodingburger

Bump! Same error here!

LunRos avatar Sep 23 '24 03:09 LunRos

Same error running 24H2.

gregniblack avatar Oct 14 '24 13:10 gregniblack

I know practically nothing about C#; but after some trial-and-error, I copied System.Security.Principal.Windows.dll and replaced System.Memory.dll from C:\Windows\System32\WindowsPowerShell\v1.0 into the UWPHook install folder (C:\Users\<username>\AppData\Roaming\Briano\UWPHook for me). And the relevant dependencies now load correctly in Windows 11 24H2.

Fixing this issue for good will still need some effort from the developer's side; but for now this workaround works for me.

ChiragCSR avatar Oct 24 '24 15:10 ChiragCSR

The GOAT

BlueCore7805 avatar Nov 01 '24 03:11 BlueCore7805

@jenesuispasbavard did have the solution for us. The Powershell from this Windows build comes with a new "System.Memory.dll" which access to "System.Security.Principal.Windows.dll". Both seems to be in PATH, so if you would load it from there it should work rightaway. For everyone using it copying both files from "C:\Windows\System32\WindowsPowerShell\v1.0" works fine. But i think for you it is hard to deliver both of them in your Release, so accessing the one from PATH might be the solution. Not sure if that works out for every older windows version.

What can i do, to help you debugging?

manituu avatar Nov 11 '24 06:11 manituu

I know practically nothing about C#; but after some trial-and-error, I copied System.Security.Principal.Windows.dll and replaced System.Memory.dll from C:\Windows\System32\WindowsPowerShell\v1.0 into the UWPHook install folder (C:\Users\<username>\AppData\Roaming\Briano\UWPHook for me). And the relevant dependencies now load correctly in Windows 11 24H2.

Fixing this issue for good will still need some effort from the developer's side; but for now this workaround works for me.

I feel like I'm misunderstanding something here. I took System.Memory.dll and System.Security.Principal.Windows.dll and pasted them into the UWPHook install folder like you said but it didn't fix a thing

CressoTheGrey avatar Nov 16 '24 21:11 CressoTheGrey

I know practically nothing about C#; but after some trial-and-error, I copied System.Security.Principal.Windows.dll and replaced System.Memory.dll from C:\Windows\System32\WindowsPowerShell\v1.0 into the UWPHook install folder (C:\Users\<username>\AppData\Roaming\Briano\UWPHook for me). And the relevant dependencies now load correctly in Windows 11 24H2. Fixing this issue for good will still need some effort from the developer's side; but for now this workaround works for me.

I feel like I'm misunderstanding something here. I took System.Memory.dll and System.Security.Principal.Windows.dll and pasted them into the UWPHook install folder like you said but it didn't fix a thing

Oh, it's because my install folder was in downloads, my bad. I just put it in C:\Users\<username>\AppData\Roaming\Briano\UWPHook

CressoTheGrey avatar Nov 20 '24 18:11 CressoTheGrey

I have created a fix for this.

https://github.com/BrianLima/UWPHook/pull/152

dos-ise avatar Nov 29 '24 13:11 dos-ise

Here is a release with this fix included.

https://github.com/dos-ise/UWPHook/releases/tag/Fix

dos-ise avatar Nov 29 '24 13:11 dos-ise

I've pushed a new release with the fix proposed by @dos-ise:

https://github.com/BrianLima/UWPHook/releases/tag/2.14.2

BrianLima avatar Dec 01 '24 14:12 BrianLima

I've just installed 2.14.2 and I encounter this issue. The contents of my log file is:

2024-12-01 15:32:21.359 +00:00 [INF] Init log with ERROR level.
2024-12-01 15:32:23.064 +00:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

(This is without trying any of the workarounds in this issue)

Windows info:

Edition	Windows 11 Pro
Version	24H2
Installed on	‎18/‎09/‎2024
OS build	26100.2454
Experience	Windows Feature Experience Pack 1000.26100.36.0

AKK9 avatar Dec 01 '24 15:12 AKK9

@AKK9

Could you try this release? https://github.com/dos-ise/UWPHook/releases/tag/Port

I have created a .NET8 Port of UWPHook with a single file publish. This should solve version conflict problems.

dos-ise avatar Dec 01 '24 16:12 dos-ise

@dos-ise This works!

AKK9 avatar Dec 01 '24 17:12 AKK9

Actually it just closes when I click the Export button. Logs don't help much:

2024-12-01 18:05:09.874 +00:00 [INF] Init log with ERROR level.

AKK9 avatar Dec 01 '24 18:12 AKK9

Thanks @AKK9 for testing. I found the error and have updated the release.

https://github.com/dos-ise/UWPHook/releases/tag/Port

dos-ise avatar Dec 01 '24 18:12 dos-ise

Just ran the new version in this repository, I get the following error: image I have added my System.Security.Principal.Windows.dll to the apps folders.

I have attached my application.log (there are a few more errors because I ran it multiple times) application.log

What should I do? Thanks! Here are the TEXT contents of the application.log:

2024-12-01 13:52:13.851 -05:00 [INF] Init log with ERROR level.
2024-12-01 13:52:15.211 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-12-01 13:52:15.211 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-12-01 14:07:06.751 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-12-01 14:07:06.751 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-12-01 14:07:14.916 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-12-01 14:07:14.916 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-12-01 14:09:33.697 -05:00 [INF] Init log with ERROR level.
2024-12-01 14:09:34.456 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:09:34.456 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:09:50.688 -05:00 [INF] Init log with ERROR level.
2024-12-01 14:09:51.444 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:09:51.445 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:16:30.179 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:16:30.179 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:16:54.389 -05:00 [INF] Init log with ERROR level.
2024-12-01 14:16:55.159 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:16:55.160 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:17:19.945 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:17:19.945 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:17:44.502 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:17:44.502 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:17:48.558 -05:00 [INF] Init log with ERROR level.
2024-12-01 14:17:49.310 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-12-01 14:17:49.311 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-12-01 14:19:51.520 -05:00 [INF] Init log with ERROR level.
2024-12-01 14:19:52.294 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2024-12-01 14:19:52.295 -05:00 [ERR] Error trying to get installed apps on your PC 
Could not load file or assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

cooldudeseven7Dev avatar Dec 01 '24 19:12 cooldudeseven7Dev

@cooldudeseven7Dev Could you try this version?

https://github.com/dos-ise/UWPHook/releases/tag/Port

dos-ise avatar Dec 01 '24 20:12 dos-ise

I've pushed a new release with the fix proposed by @dos-ise:

https://github.com/BrianLima/UWPHook/releases/tag/2.14.2

I don't know what went wrong but this release does contain the correct dll Files. Check here: https://github.com/dos-ise/UWPHook/releases/tag/Fix

dos-ise avatar Dec 02 '24 06:12 dos-ise

@dos-ise Nice! I can confirm the app loads the app list and exports them into Steam.

However, when I try to launch them from Stream I get an error. I've tried STALKER 2, Celeste, Tunic and Dead Island 2, and the error looks like this: image

But not sure if this is even relevant to this issue, or a something else entirely

AKK9 avatar Dec 02 '24 11:12 AKK9

@dos-ise Nice! I can confirm the app loads the app list and exports them into Steam. But not sure if this is even relevant to this issue, or a something else entirely

Can confirm. There is still a bug in the .NET8 port

Try to look into it today.

dos-ise avatar Dec 02 '24 12:12 dos-ise

@AKK9 I have updated the port. Take a look at this version.

https://github.com/dos-ise/UWPHook/releases/tag/Port

dos-ise avatar Dec 02 '24 12:12 dos-ise

@cooldudeseven7Dev Could you try this version?

https://github.com/dos-ise/UWPHook/releases/tag/Port

THANK YOU SO MUCH! This worked PERFECTLY!

cooldudeseven7Dev avatar Dec 03 '24 00:12 cooldudeseven7Dev

Hey. For me it doesnt send anything to Steam. I just select the Game and press "export", but then it just seems to get stuck and the App closes. Any idea whats happening?

CaptSyndrum avatar Dec 04 '24 18:12 CaptSyndrum