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

[Problem/Bug]: HdmiDisplayInformation.getForCurrentView().getSupportedDisplayModes() throws error in JS #4958

Open
reece-white opened this issue Nov 29, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@reece-white
Copy link

What happened?

Calling window.Windows.Graphics.Display.Core.HdmiDisplayInformation.getForCurrentView().getSupportedDisplayModes() in JavaScript throws error:

VM1610:1 Uncaught Error: Member not found. (0x80020003)
    at RemoteMessenger.postSyncRequestMessage (<anonymous>:1:18409)
    at Function.applyHostFunction (<anonymous>:1:38041)
    at Object.apply (<anonymous>:1:26077)
    at <anonymous>:1:81

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

No response

SDK Version

No response

Framework

WinUI2/UWP

Operating System

Xbox

OS Version

No response

Repro steps

Follow steps here to add a WinRT adapter: https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/winrt-from-js?tabs=winui2%2Cwinrtcsharp

Add the Windows.Display.Graphics.Core package

Expose to JS runtime via bridge

Call window.Windows.Graphics.Display.Core.HdmiDisplayInformation.getForCurrentView().getSupportedDisplayModes() in the JS app.

Observe the below error:
image

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

@reece-white reece-white added the bug Something isn't working label Nov 29, 2024
@bradp0721 bradp0721 assigned lflores-ms and unassigned bradp0721 Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants