-
Notifications
You must be signed in to change notification settings - Fork 54
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
Gamepad API only works when developer tools is opened. #3025
Comments
Hello @abiliaorg, Thanks for your bug report. I've assigned this to a dev that can best try to replicate the issue and follow up on this. |
@abiliaorg Do you use WPF/WinForms framework with WebView2 control? Also, Could you share some sample code to show Gamepad API using? |
Hello @ElyssaJyu, @victorthoang , GamePad stopped working in WebView completely, with or without the developer console. Here's a tiny project to illustrate this using Photino (a lean C# WebView wrapper): https://github.com/RonenNess/WebView-Gamepad-Issue It loads the index.html file under wwwroot that alert and write to console when a gamepad is connected. Please fix this is really harmful for people who use WebViews to render HTML games locally.. Thanks. |
@RonenNess |
Photino on windows is just a wrapper around WebView2. If you want I can make a forms project later at home, the result will probably remain the same. |
Here, with forms and Microsoft official controller Same result. The issue is with the WebView2 itself. The version of the NuGet doesn't matter either, tried older versions too. Tested gamepad: xbox controller |
Hi @RonenNess, Thanks for your sample projects to help us reproduce the issue!
Also as you mentioned in 114, Gamepad stop using after connected. I also tested it (simply test the buttons), but it works normally. |
Hi @ElyssaJyu thank you for checking! This is very strange because the reason I even tested it was some of my users complained it stopped working for them so I know there are at least few people other then me experiencing this. Do you have the same webview2 the rest of us have distributed with windows updates or maybe you have internal dev version that is not out yet? Is there a way for me to check if I have the same version as you? Thanks :) |
Hi @RonenNess |
Hi @ElyssaJyu 108.0.1462.54 Is this what you have? |
It's the same one I have and use. It's the latest version. Does the project work now? |
Nope doesn't work. And I even reinstalled WebView. If it was just me I'd say maybe something is just messed up with my PC, but as I said my players report gamepad suddenly stopped working for them too + there's @abiliaorg here that report something similar.. @abiliaorg can you test too and tell us if it works for you now? You seem to have older webview version which is interesting, but you have windows 10 like me. |
I found something interesting, there seems to be a problem with Edge itself. Up until now I tested the gamepad either with chrome / firefox or WebView, just now I realized I never actually tested gamepad with Edge browser. So I did, and it doesn't work: I then checked on a laptop that has older Edge version and tested - it worked: So I updated that laptop Edge to latest version and it stopped working just like on my other computer. Edge update from 107 to 108 seems to break gamepad Can you check your Edge browser version? Is it possible that you have WebView 108 like me, but Edge version 107? |
Hi @ElyssaJyu I'm sorry but this is absolutely NOT an xbox controller issue.
"it works for me so there's no bug" is not a serious response to this condition... even if this issue is with a specific xbox model and not all controllers - its still a bug with Edge support of a specific model. Lets find out why. We need to continue and isolate differences until we nail it but "it works for me bye" is not a valid way to close this. What is your exact Edge version? Windows version? X64? home edition? I can upload some Edge dlls to compare them? Also maybe you can point me to some logs I can upload? tests to run? we only just scratched the surface in term of tests. Edit: please do add the xbox related team on this as well so they can take a look too, but I don't think the issue is just with xbox I just don't have other controllers to test. |
@ElyssaJyu To be clear:
Really don't know what else to say. I can provide any info you need just let me know what. |
@RonenNess. My previous response might cause some misunderstanding. Really sorry for that. Definitely, I don't mean that "it works for me so there's no bug". I have the same Edge version and WebView2 version with your setting. I have been checking it on different device, might need time to figure the difference. |
Lets find the differences.
|
Edge is not detecting gamepads/controllers, after updating Edge version. I tagged as "tracked", so we can track it internally. We are aware of this and currently investigating. I will let you know the update as soon as possible. |
Hi @ElyssaJyu sorry for the somewhat aggressive response I got the wrong idea from the suggestion to contact xbox. So just to make sure - do you need additional info from me or did you manage to reproduce the issue on your end? If there's something I can assist with please let me know :) Got windows 10 home edition and wired controller btw. |
I find that our internal related gamepad team has be aware of this issue and working on it. (Also, I have described your issue to them.) I'm not sure when the fix can be released, but our engineers do aware of it. Also, I have followed the issue, and will let you know when it has been resolved. |
Hi @RonenNess, What's your gamepad PID/VID pair? It might help the team to resolve the issue. |
Hi @ElyssaJyu this is the information I have in device manager events log, I think it contains what you need: Device USB\ VID_20D6&PID_2001 \0000010186E85D0F was configured. Driver Name: dc1-controller.inf |
Thanks. I have provided to the team. We are working on it. |
Thanks @ElyssaJyu and everyone. |
Hi @abiliaorg, could you provide the WebView2 version and your gamepad PID/VID pair? In case, could you help us try open https://gamepad-tester.com/ on edge browser to test whether the gamepad can be recognized? It will help us to fix the issue. Thanks. |
Any news about this? Anything I can help with? |
We are still working on this issue, but it might take a while because of the holiday break. But I will let you get the update as soon as possible. |
Bump - any news / estimation? |
@RonenNess We have already had an idea on how to resolve the issue. I will let you know when we have made progress on this. |
@RonenNess Hi, the fix for that issue just landed in Edge 112.0.1689.0 (Official build) canary (64-bit). Could you try it out to see whether it works? Thanks. |
Hi @ElyssaJyu It looks like I can't get the 112 update at the moment, maybe it has a region-based rollout and it hasn't reach me yet. I will try again in few days and see if I can update and if it fixed the issue. |
You can download 112.0.1690.0 from Canary channel Download Microsoft Edge
Insider Channels <https://www.microsoftedgeinsider.com/download>
…--
Mike
пн, 20 февр. 2023 г. в 21:26, Ronen ***@***.***>:
Hi @ElyssaJyu <https://github.com/ElyssaJyu>
It looks like I can't get the 112 update at the moment, maybe it has a
region-based rollout and it hasn't reach me yet.
[image: image]
<https://user-images.githubusercontent.com/3426999/220177775-59416504-fff4-4790-b12f-afbab1294204.png>
I will try again in few days and see if I can update and if it fixed the
issue.
Thanks! :)
—
Reply to this email directly, view it on GitHub
<#3025 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC5IURNNEWJREWRU7MPY3TLWYOZOBANCNFSM6AAAAAASVHKJGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Downloaded canary version: Can confirm the xbox controller works in the bworser. Is there an easy way to test the WebView as well? |
|
It works for me.
Here https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/set-preview-channel
you find other ways to switch between WV2 runtimes.
…--
Mike
пн, 20 февр. 2023 г. в 23:14, Ronen ***@***.***>:
I tried adding Environment.SetEnvironmentVariable("WEBVIEW2_RELEASE_CHANNEL_PREFERENCE",
"1"); before setting up the WebView window but nothing changed. Also
tried setting the environment variable in system properties and not via
code and nothing changed.
Not sure if its an indicator but when I run the program and check in task
manager I see the old version:
[image: image]
<https://user-images.githubusercontent.com/3426999/220191318-abe34ee2-c8b5-4734-a741-add5ef3344e0.png>
—
Reply to this email directly, view it on GitHub
<#3025 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC5IURLUQZU7ZONUOSWD4QDWYPGC5ANCNFSM6AAAAAASVHKJGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks @mikeduglas's reference and help. |
Hey @RonenNess, please update WebView2 to 1.0.1724-prerelease. Could you confirm whether the Xbox controller works? Thanks |
@RonenNess Closing this issue, unless the latest prerelease still doesn't work. If that's the case you can reopen the issue and let us know. Thanks! |
Hi sorry for not replying, I updated Edge to latest rebuilt the application (not sure if was necessary) and gamepad works in webview. Thanks :) if the issue somehow returns I'll let you know. |
Description
I'm creating a videogame using Gamepad API running on a WebView2 instance. Anytime I use my Gamepad (SPEEDLINK COMPETITION PRO) it does not work if I focus on the browser window. Whenever I open the developer tools and I focus on that window, the gamepad is recognized and the videogame receives gamepad events.
Version
SDK: 1.0.1150.38
Runtime: Edge WebView2 Runtime 107.0.1418.62
Framework: .NET Framework 4.8
OS: Win10
Repro Steps
AB#42714785
The text was updated successfully, but these errors were encountered: