home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.98k stars 2.71k forks source link

Unable to use voice input microphone, prompt”. /“bug, 7.0b5 #21234

Closed knoop7 closed 3 months ago

knoop7 commented 3 months ago

Checklist

Describe the issue you are experiencing

2024-06-30 15 37 04

Unable to use voice input microphone, prompt. /bug,7.0b5 audio-recorder.ts:40 TypeError: Failed to resolve module specifier "core-js/modules/es.array.iterator.js". Relative references must start with either "/", "./", or "../".

2024-06-30 15 39 45

Hopefully, this resolves the issue with browser identification Mozilla/5.0 (Macintosh; Intel Mac OS

Describe the behavior you expected

or

Steps to reproduce the issue

1. 2. 3. ...

What version of Home Assistant Core has the issue?

core-2024.7.0b5

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

No response

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

silamon commented 3 months ago

cc @steverep I see some imports of core-js into those audio related areas so I think it's related to #20676

silamon commented 3 months ago

I see a javascript file "recorder.worklet.js" under src/util where there are core-js imports being added after build. It's the first file under hass_frontend "_src_util_recorder_worklet_js.js".

import "core-js/modules/es.array.iterator.js";
import "core-js/modules/es.array-buffer.detached.js";
import "core-js/modules/es.array-buffer.transfer.js";
import "core-js/modules/es.array-buffer.transfer-to-fixed-length.js";
import "core-js/modules/es.typed-array.int16-array.js";
import "core-js/modules/es.typed-array.at.js";
(snip)
class RecorderProcessor extends AudioWorkletProcessor {
(snip)

I'm not sure if that's coming from there, since the stack trace points slightly different, but the imports in the "ha-voice-command-dialog" seem to start with "./node-modules/core-js/.." and are correct.

steverep commented 3 months ago

Yeah, Webpack doesn't handle the audio worklet correctly (https://github.com/webpack/webpack/issues/11543). I'll fix it.

knoop7 commented 3 months ago

Yeah, Webpack doesn't handle the audio worklet correctly (webpack/webpack#11543). I'll fix it.

Thank you, thank you very much

knoop7 commented 3 months ago

I see a javascript file "recorder.worklet.js" under src/util where there are core-js imports being added after build. It's the first file under hass_frontend "_src_util_recorder_worklet_js.js".

import "core-js/modules/es.array.iterator.js";
import "core-js/modules/es.array-buffer.detached.js";
import "core-js/modules/es.array-buffer.transfer.js";
import "core-js/modules/es.array-buffer.transfer-to-fixed-length.js";
import "core-js/modules/es.typed-array.int16-array.js";
import "core-js/modules/es.typed-array.at.js";
(snip)
class RecorderProcessor extends AudioWorkletProcessor {
(snip)

I'm not sure if that's coming from there, since the stack trace points slightly different, but the imports in the "ha-voice-command-dialog" seem to start with "./node-modules/core-js/.." and are correct.

Thank you, thank you very much