Skip to content
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

Not working on Windows PowerShell #2

Closed
TobiasPSP opened this issue May 22, 2023 · 5 comments
Closed

Not working on Windows PowerShell #2

TobiasPSP opened this issue May 22, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@TobiasPSP
Copy link

When I tested the module, it works in PowerShell 7 but fails in Windows PowerShell.
With any cmdlet, I get this exception:

Exception calling "QueryServer" with "2" argument(s): "Query 59746 =>
8.8.8.8.in-addr.arpa. IN PTR on 192.168.2.1:53 failed with an error."
At C:\Users\tobia\OneDrive\Dokumente\WindowsPowerShell\Modules\DnsClient-
PS\1.1.0\Public\Resolve-Dns.ps1:78 char:17
+                 $client.QueryServer($nsList, $qst)
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationExce
   ption
    + FullyQualifiedErrorId : DnsResponseException
@TobiasPSP
Copy link
Author

Apparently, when you changed the lib you also broke compatibility to Windows PowerShell. Version 1.0.0 works like a charm.

@rmbolger rmbolger self-assigned this May 22, 2023
@rmbolger rmbolger added the bug Something isn't working label May 22, 2023
@rmbolger
Copy link
Owner

Thanks for the heads up, @TobiasPSP. Sorry about that. Breaking Windows PS wasn't intended. Give me a bit to look into it.

@rmbolger
Copy link
Owner

It looks like this may be a bug in how the DnsClient library defines its dependencies. When I dig into the error being thrown, it's whining about not being able to find System.Buffers version 4.4.0 (assembly version 4.0.2.0) which is weird because the nuget dependencies page for DnsClient say that it needs at least version 4.5.1 (assembly version 4.0.3.0).

If I roll back just the System.Buffers dll to the 4.4.0 version that was included in the module v1.0, queries seem to work again. I think the reason it didn't break for PowerShell 7 is that the System.Buffers dependency isn't actually needed (again despite the nuget dependencies implying otherwise).

In any case, I'll get an updated version out with the System.Buffers rolled back and maybe file an issue with the library author.

@rmbolger
Copy link
Owner

This is now live in 1.1.1

@TobiasPSP
Copy link
Author

TobiasPSP commented May 22, 2023

Awesome, thx! You rock, that’s a remarkable response time… ;-)

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