yomidevs / yomitan

Pop-up dictionary browser extension. Successor to Yomichan.
https://yomitan.wiki
GNU General Public License v3.0
1.26k stars 99 forks source link

"Could not download audio" error #1307

Closed YukiNagat0 closed 2 months ago

YukiNagat0 commented 2 months ago

Description After update "Could not download audio" error started appearing.

Log:

log.js:138 
Yomitan 24.7.31.0 has encountered a problem.
Originating URL: chrome-extension://likgccmbimhjbgkjambclfkhldnlhbnn/sw.js
ExtensionError: Could not download audio
    at AudioDownloader.downloadTermAudio (chrome-extension://likgccmbimhjbgkjambclfkhldnlhbnn/js/media/audio-downloader.js:112:23)
    at async Backend._injectAnkiNoteAudio (chrome-extension://likgccmbimhjbgkjambclfkhldnlhbnn/js/background/backend.js:2178:36)
    at async Backend._injectAnkNoteMedia (chrome-extension://likgccmbimhjbgkjambclfkhldnlhbnn/js/background/backend.js:2133:33)
    at async Backend._onApiInjectAnkiNoteMedia (chrome-extension://likgccmbimhjbgkjambclfkhldnlhbnn/js/background/backend.js:633:16)
Data: {
    "errors": [
        {}
    ]
}

Issues can be reported at https://github.com/themoeway/yomitan/issues
logGenericError @ log.js:138

Browser version Chrome 127.0.6533.100

Yomitan version Yomitan 24.7.31.0

Exported settings file (If you think it might be relevant, create a settings export file using the Export Settings button on the settings page and attach it to this issue.)

Kuuuube commented 2 months ago

This is expected and intentional. Yomitan now shows the error if it fails to retrieve audio instead of hiding it.

Is there a reason you think it should be hidden in whatever case youve hit here? What were you doing to get the error?

YukiNagat0 commented 2 months ago

What do you mean by "fails to retrieve audio"?

The thing is that this error does not appear when trying to play audio for word with no audio (sorry for tautology). For example, search for "目見当", there is no audio, but error does not show up.

So I somehow made the error appear not in proper context. Do not remember exactly what I have done - just was making cards for anki.

Kuuuube commented 2 months ago

It may only log when it fails when adding audio to an anki card.

YukiNagat0 commented 2 months ago

It may only log when it fails when adding audio to an anki card.

Yeah, that's what it turned out to be - trying to add anki card for word with no audio => "Could not download audio" error.

I don't know if it is particularly useful to pop error (in console) in this case. For me, personally, "clack sound" is enough. It is a little scarry to see red exclamation marks just because of no audio for anki card.

Kuuuube commented 2 months ago

It's intended for troubleshooting if something is actually going wrong not just telling the user when it didnt work.

Maybe it could be switched to a warning.