-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
iOS: System.Net.NetworkInformation.Ping.Send throws System.Net.NetworkInformation.PingException: An exception occurred during a Ping request. #41355
Labels
Milestone
Comments
Dotnet-GitSync-Bot
added
area-System.Net
untriaged
New issue has not been triaged by the area owner
labels
Aug 25, 2020
Tagging subscribers to this area: @dotnet/ncl |
61 tasks
This dup of #36890 and #36941. cc: @marek-safar |
Closing as duplicate of #36941. |
rolfbjarne
added a commit
to rolfbjarne/xamarin-macios
that referenced
this issue
Aug 26, 2020
….NET. System.Net.NetworkInformation.Ping.Send doesn't work. Ref: dotnet/runtime#41355 Fixes this link sdk test failure: LinkSdk.DllImportTest [FAIL] LackOfCapget : Expected: <System.InvalidOperationException> But was: <System.Net.NetworkInformation.PingException: An exception occurred during a Ping request. ---> System.ComponentModel.Win32Exception (2): No such file or directory at System.Diagnostics.Process.EnsureInitialized() at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Net.NetworkInformation.Ping.SendWithPingUtility(IPAddress address, Byte[] buffer, Int32 timeout, PingOptions options) at System.Net.NetworkInformation.Ping.SendPingCore(IPAddress address, Byte[] buffer, Int32 timeout, PingOptions options) at System.Net.NetworkInformation.Ping.GetAddressAndSend(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options) --- End of inner exception stack trace --- at System.Net.NetworkInformation.Ping.GetAddressAndSend(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options) at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options) at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress, Int32 timeout, Byte[] buffer) at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress) at LinkSdk.DllImportTest.<>c__DisplayClass3_0.<LackOfCapget>b__0() in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/linker/ios/link sdk/DllImportTest.cs:line 88 at NUnit.Framework.Assert.Throws(IResolveConstraint expression, TestDelegate code, String message, Object[] args)> at LinkSdk.DllImportTest.LackOfCapget() in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/linker/ios/link sdk/DllImportTest.cs:line 88
ghost
locked as resolved and limited conversation to collaborators
Dec 7, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Repro:
result:
I'm not sure what the behavior/result should be (the ideal is probably that it should just work, but that would probably need a very different implementation - see also https://xamarin.github.io/bugzilla-archives/96/964/bug.html), but I don't think it should be a PingException. Maybe a PlatformNotSupportedException?
The stack trace also shows that the current code tries to launch another process. That doesn't work on any of Apple's mobile platforms. Most of the System.Diagnostics.Process class should probably just throw PlatformNotSupportedException.
Configuration
.NET 5.0.100-rc.1.20414.5
iOS BCL (microsoft.netcore.app.runtime.ios-x64/5.0.0-rc.1.20404.16)
The text was updated successfully, but these errors were encountered: