[Bug]: Cannot "listen to beginning of chapter" on firefox after embedding metadata #1902

Closed
opened 2026-04-25 00:01:08 +02:00 by adam · 4 comments
Owner

Originally created by @Dylancyclone on GitHub (Apr 22, 2024).

Describe the issue

When trying to click the "listen to beginning of chapter" button on the "edit chapters" page of an audiobook that has metadata embedded in it, the spinner will spin infinitely and the following is put into the console:

image

Play Chapter 0 [2fa1ef5.js:1:5744]([snip]/_nuxt/2fa1ef5.js)
Media resource https://[snip]/api/items/b01fb6ea-dbf8-4d75-90d2-6fd28a875c50/file/10653458?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJhZG1pbiIsImlhdCI6MTY2NzczMzkxNn0.4Nzb_9_-TIhPgFyex9KGVz7AnVriDv_5jGkt1vu4toc could not be decoded. [chapters](https://[snip]/audiobook/b01fb6ea-dbf8-4d75-90d2-6fd28a875c50/chapters)
Media resource https://[snip]/api/items/b01fb6ea-dbf8-4d75-90d2-6fd28a875c50/file/10653458?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJhZG1pbiIsImlhdCI6MTY2NzczMzkxNn0.4Nzb_9_-TIhPgFyex9KGVz7AnVriDv_5jGkt1vu4toc could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004)
Details: MediaResult mozilla::FFmpegAudioDecoder<60>::DecodeUsingFFmpeg(AVPacket *, bool &, MediaRawData *, DecodedData &, bool *): FFmpeg audio error [chapters](https://[snip]/audiobook/b01fb6ea-dbf8-4d75-90d2-6fd28a875c50/chapters)

image

I'm running on linux, and this only happens on FireFox, a chromium based browser works fine

Steps to reproduce the issue

  1. Go to an audiobook's page
  2. Click Edit -> Tools -> Embed metadata into the audiobook
  3. Go back to the audiobook's page and click "Edit Chapters"
  4. Click "listen to beginning of chapter" next to any of the chapters

Audiobookshelf version

v2.9.0

How are you running audiobookshelf?

Docker

Originally created by @Dylancyclone on GitHub (Apr 22, 2024). ### Describe the issue When trying to click the "listen to beginning of chapter" button on the "edit chapters" page of an audiobook that has metadata embedded in it, the spinner will spin infinitely and the following is put into the console: ![image](https://github.com/advplyr/audiobookshelf/assets/19830705/9a20e548-7ccc-4603-adc3-c5c848915b4e) ``` Play Chapter 0 [2fa1ef5.js:1:5744]([snip]/_nuxt/2fa1ef5.js) Media resource https://[snip]/api/items/b01fb6ea-dbf8-4d75-90d2-6fd28a875c50/file/10653458?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJhZG1pbiIsImlhdCI6MTY2NzczMzkxNn0.4Nzb_9_-TIhPgFyex9KGVz7AnVriDv_5jGkt1vu4toc could not be decoded. [chapters](https://[snip]/audiobook/b01fb6ea-dbf8-4d75-90d2-6fd28a875c50/chapters) Media resource https://[snip]/api/items/b01fb6ea-dbf8-4d75-90d2-6fd28a875c50/file/10653458?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJhZG1pbiIsImlhdCI6MTY2NzczMzkxNn0.4Nzb_9_-TIhPgFyex9KGVz7AnVriDv_5jGkt1vu4toc could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) Details: MediaResult mozilla::FFmpegAudioDecoder<60>::DecodeUsingFFmpeg(AVPacket *, bool &, MediaRawData *, DecodedData &, bool *): FFmpeg audio error [chapters](https://[snip]/audiobook/b01fb6ea-dbf8-4d75-90d2-6fd28a875c50/chapters) ``` ![image](https://github.com/advplyr/audiobookshelf/assets/19830705/883a993f-0412-44a5-854e-6edeb63845da) I'm running on linux, and this only happens on FireFox, a chromium based browser works fine ### Steps to reproduce the issue 1. Go to an audiobook's page 2. Click Edit -> Tools -> Embed metadata into the audiobook 3. Go back to the audiobook's page and click "Edit Chapters" 4. Click "listen to beginning of chapter" next to any of the chapters ### Audiobookshelf version v2.9.0 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-25 00:01:08 +02:00
adam closed this issue 2026-04-25 00:01:08 +02:00
Author
Owner

@nichwall commented on GitHub (Apr 22, 2024):

Does playback work for the audiobook normally in the same browser (clicking Play and streaming)? Does it work if you skip to a chapter to listen to the book?

Is this for all books or only certain books?

@nichwall commented on GitHub (Apr 22, 2024): Does playback work for the audiobook normally in the same browser (clicking Play and streaming)? Does it work if you skip to a chapter to listen to the book? Is this for all books or only certain books?
Author
Owner

@Dylancyclone commented on GitHub (Apr 22, 2024):

Yes, normal playback does work, as well as skipping around chapters.
And actually yes it appears to just be for this one book, others seem to work fine.

... looking into it further, it seems this issue only occurs after embedding metadata into the audiobook file.
I can test this by restoring the backup of the original audio file (from /metadata/cache/items/...), clicking on the "listen to beginning of chapter" button (which does work), then reembedding the metadata and trying again, which results in the same issue as above. I've updated the original issue with this info

@Dylancyclone commented on GitHub (Apr 22, 2024): Yes, normal playback does work, as well as skipping around chapters. And actually yes it appears to just be for this one book, others seem to work fine. ... looking into it further, it seems this issue only occurs after embedding metadata into the audiobook file. I can test this by restoring the backup of the original audio file (from `/metadata/cache/items/...`), clicking on the "listen to beginning of chapter" button (which does work), then reembedding the metadata and trying again, which results in the same issue as above. I've updated the original issue with this info
Author
Owner

@nichwall commented on GitHub (Apr 22, 2024):

Ah, yeah there are issues with tone with some m4b files (what is used to embed and encode the metadata). It is planned to be replaced with ffmpeg but that hasn't happened yet. Glad you were able to restore from a backup.

https://github.com/advplyr/audiobookshelf/issues/1085
https://github.com/advplyr/audiobookshelf/issues/2557

@nichwall commented on GitHub (Apr 22, 2024): Ah, yeah there are issues with tone with some m4b files (what is used to embed and encode the metadata). It is planned to be replaced with ffmpeg but that hasn't happened yet. Glad you were able to restore from a backup. https://github.com/advplyr/audiobookshelf/issues/1085 https://github.com/advplyr/audiobookshelf/issues/2557
Author
Owner

@advplyr commented on GitHub (Apr 22, 2024):

Duplicate of #1085

@advplyr commented on GitHub (Apr 22, 2024): Duplicate of #1085
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1902