Closed billreiss closed 1 year ago
Hi @billreiss. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Hi @billreiss. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
I have added a repro at https://github.com/billreiss/maui_bugs/tree/main/16957/Maui8App2 using the steps I outlined above. Click the button to send a WCF request, it will succeed on Windows and Android and fail on iOS.
@billreiss - this seems quite bizarre. Given that it's using HTTPS, there's either a problem in the service itself (seems unlikely), or perhaps in how the client code is interpreting the request. If I had to guess, this issue is either with WCF (pinging @imcarolwang - any clue?) or with the .NET networking libraries on iOS (@rolfbjarne - thoughts?).
or with the .NET networking libraries on iOS (@rolfbjarne - thoughts?)
Does it work if you set UseNativeHttpHandler=false in the project file?
<PropertyGroup>
<UseNativeHttpHandler>false</UseNativeHttpHandler>
</PropertyGroup>
Hi @billreiss. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
Verified this on Visual Studio Enterprise 17.8.0 Preview 1.0. Repro on iOS 16.4 .NET 8, not repro on Windows 11 and Android 13.0-API33 with below Project: Maui8App2.zip
If set UseNativeHttpHandler=false in project file, works fine on iOS.
<PropertyGroup>
<UseNativeHttpHandler>false</UseNativeHttpHandler>
</PropertyGroup>
OK, it looks like this is an issue in our NSUrlSessionHandler then, moving to xamarin/xamarin-macios.
This issue was moved to xamarin/xamarin-macios#18883
Description
After adding a Service Reference to a MAUI 8 app and calling it, this works fine on Windows and Android but iOS has an error:
The number of bytes available is inconsistent with the HTTP Content-Length header. There may have been a network error or the client may be sending invalid requests.
Steps to Reproduce
On Windows and Android, this runs successfully. On iOS, it fails with the error in the issue description.
Link to public reproduction project repository
https://github.com/billreiss/maui_bugs/tree/main/16957/Maui8App2
Version with bug
8.0.0-preview.7.8842
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
iOS 16.4
Did you find any workaround?
No
Relevant log output