WebView Closes When Pressing Microphone Button
Hey, when I try to open the voice assistant via the WebView in HASS.Agent, everything works fine at first, and the interface loads correctly. However, as soon as I press the microphone button to start voice input, the WebView closes automatically without any error message.
Has anyone encountered this issue before? Are there any known fixes or workarounds? Any help would be greatly appreciated!
14 Replies
Help us Help Others!
To help others find answers, you can mark your question as solved via
Right click solution message -> Apps -> ✅ Mark Solution

Help us Help You!
Please don't delete messages or posts because it makes it impossible to understand what happened. If you don't want your messages to be seen then don't post here.
Please provide us with the version number of your app.
You can find it by clicking the ? at the bottom of the main page and checking under the logo that shows.We will help as soon as possible. While you're waiting you can try the following:
- Checkout the documentation. - Search here in discord for previously solved similar issues.
@Amadeo
@DrR0x
Hm, haven't heard about it before, I'll try to test that today - it might be a problem to get fully working as I'm not sure if the webview will be able to ask for your microphone permission
plain-purpleOP•4w ago
Thank you for taking the time to look into this. With audio output, it seems that there are no problems in the WebView, but accessing the microphone is causing issues. I could imagine that this is due to missing permissions or a pop-up block. However, I’m not sure how to adjust such settings for the WebView.
@Amadeo Hey, any news?
yesn't 😄
so the status is: when I tried it, the webview closed but I have recevied a floating popup asking if I want to gran the microphone permissions
once I clicked "yes" it worked as expected after opening the webview again
Q: did you uninstall Edge by any chance? not that I'm cretain it would be connected to the issue but one of the ideas that popped up in my head
that's in kurwa language but you get the idea
now, second question, is it possible that you clicked block :D?
try this, open settings, then local storage and click "Open Folder" in web view cache section:
https://b.chihi.ro/FUMaFT.png
after it opens, close HASS.Agent (in case you use the persistant webview) and remove everything in the cache folder (NOTE: you'll need to log back again in the webview)
then start HASS.Agent, open webview, login and try again
try to see if the popup will show
plain-purpleOP•4w ago
Hey, I cleared the cache and tried accessing the microphone via the WebView after a restart, but the WebView just closes. I also tried reinstalling WebView and Edge, but unfortunately, that didn't help. I'm wondering if there's a way to directly adjust the permissions and popup blocks for WebView somewhere.
plain-purpleOP•3w ago
@Amadeo I have now installed Windows 11 on a VM to check the behavior of the WebView again. When I request microphone permissions, the WebView closes—no popup appears.

Solution
plain-purple•3w ago
got it, this checkbox was required.

now this makes it interesting
@DrR0x maybe something for the docs?