MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem]: Impossible to use GetFavicon in synchronous manner

Open
#4,704 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What happened?

The callback provided to GetFavicon is never called when waiting for the result by entering the message-loop.

Example Code:

web_view15->GetFavicon(COREWEBVIEW2_FAVICON_IMAGE_FORMAT_PNG,
                                                       Callback<GetFavicon>(callback).Get());

// Wait for the result and call PeekMessage continuously

Is it possible to somehow get the favicon in a synchronous manner? As we've seen above, entering the message loop does not help - Is there something else we're supposed to do? The callback is triggered when not waiting for the result.

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

126.0.2592.113

SDK Version

1.0.2592.51

Framework

Win32

Operating System

Windows 10

OS Version

19045.4529

Repro steps
  • Call GetFavicon
  • Wait for result to be ready by handling remaining messages via PeekMessage
Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

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.

Research direction

Start with the Win32 repro using GetFavicon, its callback, and the PeekMessage wait loop. Verify whether the callback contract supports synchronous waiting and identify the documented supported pattern or API behavior; the issue is resolved when the expected favicon retrieval behavior is clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.