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

HttpClient (dotnet) does not work #65723

Closed
Dunkhan opened this issue Sep 12, 2022 · 7 comments
Closed

HttpClient (dotnet) does not work #65723

Dunkhan opened this issue Sep 12, 2022 · 7 comments

Comments

@Dunkhan
Copy link

Dunkhan commented Sep 12, 2022

Godot version

v3.5.stable.mono.official [991bb6a]

System information

Windows 10

Issue description

Attempting to access any url whatsoever using a dotnet HttpClient instance result in an exception
System.Net.WebException: Error: TrustFailure
with a bunch of inner exceptions terminating at

Ssl error:1000007d:SSL routines😮PENSSL_internal:CERTIFICATE_VERIFY_FAILED
at /root/mono-6.12.0.182/external/boringssl/ssl/handshake_client.c:1132

I understand this might be a mono bug, or a dotnet bug but I wanted to report it here first as I am not able to determine where the fault lies and godot is the direct parent of my project in terms of frameworks.

PLEASE NOTE:
I have implemented my main project using this libary on linux and it works fine. This is an issue that only appears to affect windows. I have not tested it on any platform other than linux and windows.

Steps to reproduce

us an System.Net.Http.HttpClient to connect to any website and attempt to GET the html from it.

OR

download the example project at https://github.com/Dunkhan/GodotHttpBug
Uncomment the line marked "HttpClient (dotnet)"
comment out the other test lines
Run the program

Minimal reproduction project

https://github.com/Dunkhan/GodotHttpBug

@Dunkhan
Copy link
Author

Dunkhan commented Sep 12, 2022

I was going to report this and #65722 as one bug but I decided that they don't look on the surface like they have the same cause. Nevertheless they are possibly related

@Dunkhan Dunkhan changed the title HTTPClient (dotnet) does not work HttpClient (dotnet) does not work Sep 12, 2022
@Dunkhan
Copy link
Author

Dunkhan commented Sep 13, 2022

Ok this is a bigger issue than I first realised. I thought I could convert my project to use the Godot HTTPRequest node. However a lot of other libraries also use HttpClient as the basis of their function, for example XDocument.Load and IdentityModel.OidcClient.
In order for my project to work with HTTPRequest I would have to roll my own Oidc as well as rebuilding the majority of my web interface.

@raulsntos
Copy link
Member

Sounds like a duplicate of #36958

@Dunkhan
Copy link
Author

Dunkhan commented Sep 14, 2022

You could be right. I saw that one while looking for similar issues in the tracker but the error message is different so I discounted it.
Reading it a bit more thoroughly now though, it seems there have been changes committed to try to fix this since the bug was originally reported so that might have resulted in a changed error message.
If you are sure it is, feel free to close this and I will move my interaction to the other issue

@Dunkhan
Copy link
Author

Dunkhan commented Sep 14, 2022

To get the changes in pull 64089 do I have to locally build the master branch?

@raulsntos
Copy link
Member

You can build the master branch using the instructions in the mono module README.md or wait for the Beta 1 release which is coming soon and will have .NET support.

@Dunkhan
Copy link
Author

Dunkhan commented Sep 21, 2022

Now that the beta is out I can confirm this is fixed in 4.0
I don't know if the policy is to wait for an official release before closing bugs but that is a question for #36958 as it seems confirmed that this is a duplicate.

@Dunkhan Dunkhan closed this as completed Sep 21, 2022
@Dunkhan Dunkhan closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2022
@akien-mga akien-mga added this to the 4.0 milestone Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants