-
Notifications
You must be signed in to change notification settings - Fork 7.7k
[Regression] PS7.3 - Weird network issues inside Session #18587
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
Comments
It looks like dotNet assembly path probing logic has changed for v7.3, and is preventing the dependent [remote]: PS> Add-Type -AssemblyName 'System.Net.Quic' -PassThru
Error: Cannot find path 'C:\System.Net.Quic.dll' because it does not exist. However, I am able to get the probing path corrected by running other commands: [remote]: PS> Find-module -name az -repository psgallery
[remote]: PS> Add-Type -AssemblyName 'System.Net.Quic' -PassThru
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
False False Interop System.Object
...
[remote]: PS> Invoke-WebRequest -Uri 'https://www.powershellgallery.com/api/v2'
StatusCode : 200
StatusDescription : OK
... @daxian-dbw I suspect this problem is happening on remote sessions because they are hosted as WinRM plugins, and the dotNet default assembly probing location is not correct (should be $PSHOME). For some reason running other cmdlets (Find-Module) fixes the probing path so that the assembly can be loaded. Are you aware of any changes in dotNet v7.3 that would cause this, and is there anything we can do to ensure the probing path for remote sessions starts at $PSHOME? |
This is because the Trusted Platform Assemblies used in our WinRM plugin was not updated. The fix was submitted: PowerShell/PowerShell-Native#83 |
Hi, does this require a new patch release for 7.3? Or is there any workaround when PS 7.3 is already installed? |
@dmpe The fix will be in 7.3.1 (Jan 23). |
A correction, the fix will be in 7.3.2, which will be released in January. |
Does “System.Net.Quic.dll” rely on libmsquic.so on the Linux platform? |
I'm running 7.3.2 locally and remotely and getting a similar error, which was marked as a duplicate of this issue in #18671:
Local $PSVersionTable
Remote $PSVersionTable
Edit: Corrected remote $PSVersionTable. Looks like I originally pasted the same one for local and remote by mistake. |
Can confirm - I am still having the same issue with remote system on 7.3.2. I will be rolling back again.
|
I have verified that this was fixed with the v7.3.2 release of PowerShell. @eeskildsen and @phdavis, please double check the The following screenshot shows the results from running |
@daxian-dbw my apologies. I must not have caught that when I was testing. I can confirm forcing it to use 7.3.2 specifically works. I'm not sure which version it was trying to use previously since I thought I had removed the old configurations. |
This issue should NOT be closed. The update from 7.2.x to 7.3.x still doesn't fix the configuration 'Powershell.7' which is left dangling and pointing to a non existent 7.2. Forcing the connection to 'Powershell.7.3.8' is not acceptable beacuse any script will stop working when the server side is update to 7.3.9. |
Try deleting all existing configurations and then run Get-PSSessionConfiguration | Unregister-PSSessionConfiguration
Enable-PSRemoting |
Thank you, I know this workaround (and it works). But if it (still) needs a workaround, it's a bug, and it's not closed ;) |
Prerequisites
Steps to reproduce
When inside a session to a remote machine with PS7.3+ and attempt to invoke some commands that rely on the network they seem to fail. Not all network commands fail, such as Test-NetConnection, while others such as Invoke-WebRequest, Connect-AzAccount, etc do. Those that do fail seem to reference the same failure condition 'Could not load file or assembly 'System.Net.Quic, Version=7.0.0.0' when I can get enough output from them.
Create a session or invoke a command directly on a remote machine with 7.3+ installed
Setup your test and invoke the commands. Some commands work, such as Invoke-RestMethod while others fail.
Expected behavior
Commands such as Find-Module with session should return modules matching "Az" from PSGallery.
Actual behavior
Error details
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: