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

iOS : No Route to Host on LAN #22154

Closed
melvyniandrag opened this issue May 1, 2024 · 1 comment
Closed

iOS : No Route to Host on LAN #22154

melvyniandrag opened this issue May 1, 2024 · 1 comment
Labels
platform/iOS 🍎 t/bug Something isn't working

Comments

@melvyniandrag
Copy link

Description

Seems to be the same error as was documented and closed last year. Opening this issue for the sanity of other people who face this issue in 2024 because the other tickets are from 2023 and are closed as if they've been resolved. Just want to say no you're not crazy if you have this issue, the fastest workaround I could find was to forget about logging on the LAN and just write to an external ip address.

#14930
#12731
#14224

When trying to log to a REST API running on my LAN I get the error "No Route to host". Also cannot ping.
I've verified that the iPhone is on my LAN, it has an ip address and I can hit the REST server in my browser. Just from the app I cannot ping/post/get.

As a temporary workaround I just open a port on my router and use my external ip.

I've also tried adding

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsLocalNetworking</key>
    <true/>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

to my info.plist and that does not work, same as it does not work for people in the other tickets.

This issue was present on iOS 16 as well based on those tickets and others.

Steps to Reproduce

See the previous bug tickets, it is the same error.

I am using HttpClient::Send and HttpClient::SendAsync

but various other libraries have given the same issue. Only on iOS.

Link to public reproduction project repository

No response

Version with bug

8.0.10 SR3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iPhone 11 iOS 17.4.1

Did you find any workaround?

Work around is to forward a port through my router and write to my external ip address from iOS.

Relevant log output

No response

@melvyniandrag melvyniandrag added the t/bug Something isn't working label May 1, 2024
@jfversluis
Copy link
Member

Thanks for the report! You don't mention the address you're trying to reach nor is there any reproduction so it will be hard to determine what is exactly going on. I don't think there is any widespread issue here, but rather some configuration thing inside of your machine, firewall, network, or something related.

It seems you have a good workaround, else another great option you could look at is using Dev Tunnels.

If you do think this is really an issue, I would suggest opening something on https://github.com/xamarin/xamarin-macios because if there is an issue, this is unlikely something that originates from .NET MAUI, but rather a layer deeper.

@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants