MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Calling httpclient exposed from winrt will cause app crashing

Open
#3,232 2 comments 0 reactions 2 assignees View on GitHub

@lflores-ms is already working on this.

Since Apr 20, 2023.

bug tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description
I exposed the Http namespace to web context from winrt. But invoking the API on httpclient will lead to the app crashing.

Version
SDK: 1.0.1671-prerelease or 1.0.1587.40 or 1.0.1462.37
Runtime: 110.0.1587.50
Framework: UWP Sample(see the attachment) from https://github.com/MicrosoftEdge/WebView2Samples
OS: 10.0.19045 Build 19045

Repro Steps
Build and run the demo attached, it will crash in a few seconds.
webview2_sample_uwp-test-httpclient.zip

Additional context
The code invoking the httpclient is in file add_host_object.html.
setTimeout(() => { //TestHttpRequest("https://www.fake-bing.com/"); // app will crash // TestHttpRequest("https://www.bing.com/"); // app will crash }, 1000);

AB#43680589

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.