[Bug]: Unable to process metadata.json #2767

Closed
opened 2026-04-25 00:10:19 +02:00 by adam · 1 comment
Owner

Originally created by @bilogic on GitHub (May 14, 2025).

What happened?

audiobookshelf was unable to parse a metadata.json

What did you expect to happen?

abs should be able to parse the JSON without error

Steps to reproduce the issue

This is a JSON downloaded by https://github.com/PsychedelicPalimpsest/LibbyRip

{
  "title": "The Real Hoosiers",
  "description": {
    "full": "<b>The true story behind Crispus Attucks High School and the all-Black basketball team loosely depicted as the championship opponent in the beloved classic sports movie <i>Hoosiers</i>.</b><br> <br> For far too long the mythology of Indiana basketball has been dominated by <i>Hoosiers</i>. Framed as the ultimate underdog, feel-good story, there has also long been a cultural debate surrounding the film. The Real Hoosiers sets out to illuminate the narrative that the film omits, the story of the unheralded Crispus Attucks Tigers, playing the game at the highest level in the 1950s in a racially divided Indiana.<br> After a crushing loss to Milan High School in the 1954 semifinal, which was the game that the final scenes in <i>Hoosiers </i>are based on, Attucks went on to win back-to-back Indiana state championships. That team was led by a young Oscar Robertson and coached by Ray Crowe, who fully recognized the seemingly insurmountable challenges of playing basketball in a state that was a bastion for not only the game but also the Ku Klux Klan.<br> Veteran sportswriter and the bestselling author of <i>Dream Team</i>, Jack McCallum, pulls back the curtain on that history, which is rich, far beyond the basketball court. <i>The Real Hoosiers</i> replaces a lacuna in the history of Indiana while dissecting the myths and lore of <i>Hoosier</i> hoops; placing the game in the context of migration, segregation, and integration; and enhancing our understanding of this country's struggle for civil rights.",
    "short": "<b>The true story behind Crispus Attucks High School and the all-Black basketball team loosely depicted as the championship opponent in the beloved classic sports movie <i>Hoosiers</i>.</b><br> <br> For far too long the mythology of Indiana basketball has been dominated by <i>Hoosiers</i>. Framed as the ultimate underdog, feel-good story, there has also long been a cultural debate surrounding the film. The Real Hoosiers sets out to illuminate the narrative that the film omits, the story of the unheralded Crispus Attucks Tigers, playing the game at the highest level in the 1950s in a racially divided Indiana.<br> After a crushing loss to Milan High School in the 1954 semifinal, which was the game that the final scenes in <i>Hoosiers </i>are based on, Attucks went on to win back-to-back Indiana state championships. That team was led by a young Oscar Robertson and coached by Ray Crowe, who fully recognized the seemingly insurmountable challenges of playing basketball in a state..."
  },
  "coverUrl": "/_d/cover/buid/c0950e2ae3a27b44bbb736da7df162f7/big.jpg",
  "creator": [
    {
      "name": "Jack McCallum",
      "role": "author",
      "bio": ""
    },
    {
      "name": "Cary Hite",
      "role": "narrator",
      "bio": ""
    }
  ],
  "spine": [
    {
      "duration": 4626.024375,
      "type": "audio/mpeg",
      "bitrate": 64
    },
    {
      "duration": 4215.275,
      "type": "audio/mpeg",
      "bitrate": 64
    },
    {
      "duration": 3883.781125,
      "type": "audio/mpeg",
      "bitrate": 64
    },
    {
      "duration": 4016.222,
      "type": "audio/mpeg",
      "bitrate": 64
    },
    {
      "duration": 3621.61625,
      "type": "audio/mpeg",
      "bitrate": 64
    },
    {
      "duration": 3179.493875,
      "type": "audio/mpeg",
      "bitrate": 64
    },
    {
      "duration": 4356.466875,
      "type": "audio/mpeg",
      "bitrate": 64
    },
    {
      "duration": 4125.231,
      "type": "audio/mpeg",
      "bitrate": 64
    },
    {
      "duration": 4709.0155,
      "type": "audio/mpeg",
      "bitrate": 64
    }
  ],
  "chapters": [
    {
      "title": "Opening",
      "spine": 0,
      "offset": 0
    },
    {
      "title": "Quote",
      "spine": 0,
      "offset": 33
    },
    {
      "title": "Prologue",
      "spine": 0,
      "offset": 39
    },
    {
      "title": "Chapter 1",
      "spine": 0,
      "offset": 124
    },
    {
      "title": "Chapter 1, continued",
      "spine": 0,
      "offset": 1399
    },
    {
      "title": "Chapter 2",
      "spine": 0,
      "offset": 2911
    },
    {
      "title": "Chapter 3",
      "spine": 1,
      "offset": 0
    },
    {
      "title": "Chapter 4",
      "spine": 1,
      "offset": 2539
    },
    {
      "title": "Chapter 5",
      "spine": 2,
      "offset": 0
    },
    {
      "title": "Chapter 6",
      "spine": 2,
      "offset": 2308
    },
    {
      "title": "Chapter 7",
      "spine": 3,
      "offset": 0
    },
    {
      "title": "Chapter 8",
      "spine": 3,
      "offset": 2497
    },
    {
      "title": "Chapter 9",
      "spine": 4,
      "offset": 0
    },
    {
      "title": "Chapter 10",
      "spine": 4,
      "offset": 2276
    },
    {
      "title": "Chapter 11",
      "spine": 5,
      "offset": 0
    },
    {
      "title": "Chapter 12",
      "spine": 5,
      "offset": 1897
    },
    {
      "title": "Chapter 13",
      "spine": 6,
      "offset": 0
    },
    {
      "title": "Chapter 14",
      "spine": 6,
      "offset": 1726
    },
    {
      "title": "Chapter 15",
      "spine": 6,
      "offset": 2826
    },
    {
      "title": "Chapter 16",
      "spine": 7,
      "offset": 0
    },
    {
      "title": "Chapter 17",
      "spine": 7,
      "offset": 2521
    },
    {
      "title": "Chapter 18",
      "spine": 8,
      "offset": 0
    },
    {
      "title": "Chapter 19",
      "spine": 8,
      "offset": 1992
    },
    {
      "title": "Acknowledgments",
      "spine": 8,
      "offset": 4080
    },
    {
      "title": "Closing",
      "spine": 8,
      "offset": 4606
    }
  ]
}

Audiobookshelf version

v2.21.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

2025-05-14 04:02:19.925

ERROR

[abmetadataGenerator] Invalid chapter start time undefined for "The Real Hoosiers" metadata file

2025-05-14 04:02:19.931

ERROR

[LibraryScanner] Library scan 369f7763-3560-40d2-a4a2-b02f767fed44 failed after 0:00 | 0 Added | 0 Updated | 0 Missing. ValidationError [SequelizeValidationError]: string violation: description cannot be an array or an object at InstanceValidator._validate (/node_modules/sequelize/lib/instance-validator.js:50:13) at async InstanceValidator._validateAndRunHooks (/node_modules/sequelize/lib/instance-validator.js:60:7) at async InstanceValidator.validate (/node_modules/sequelize/lib/instance-validator.js:54:12) at async Book.save (/node_modules/sequelize/lib/model.js:2426:7) at async /node_modules/sequelize/lib/model.js:2465:9 at async Promise.all (index 0) at async LibraryItem.save (/node_modules/sequelize/lib/model.js:2456:7) at async libraryItem.create (/node_modules/sequelize/lib/model.js:1362:12) at async BookScanner.scanNewBookLibraryItem (/server/scanner/BookScanner.js:563:25) at async LibraryItemScanner.scanNewLibraryItem (/server/scanner/LibraryItemScanner.js:188:24) { errors: [ ValidationErrorItem { message: 'description cannot be an array or an object', type: 'string violation', path: 'description', value: [Object], origin: 'CORE', instance: [book], validatorKey: 'not_a_string', validatorName: null, validatorArgs: [] } ] }

Additional Notes

No response

Originally created by @bilogic on GitHub (May 14, 2025). ### What happened? audiobookshelf was unable to parse a `metadata.json` ### What did you expect to happen? abs should be able to parse the JSON without error ### Steps to reproduce the issue This is a JSON downloaded by https://github.com/PsychedelicPalimpsest/LibbyRip ```JSON { "title": "The Real Hoosiers", "description": { "full": "<b>The true story behind Crispus Attucks High School and the all-Black basketball team loosely depicted as the championship opponent in the beloved classic sports movie <i>Hoosiers</i>.</b><br> <br> For far too long the mythology of Indiana basketball has been dominated by <i>Hoosiers</i>. Framed as the ultimate underdog, feel-good story, there has also long been a cultural debate surrounding the film. The Real Hoosiers sets out to illuminate the narrative that the film omits, the story of the unheralded Crispus Attucks Tigers, playing the game at the highest level in the 1950s in a racially divided Indiana.<br> After a crushing loss to Milan High School in the 1954 semifinal, which was the game that the final scenes in <i>Hoosiers </i>are based on, Attucks went on to win back-to-back Indiana state championships. That team was led by a young Oscar Robertson and coached by Ray Crowe, who fully recognized the seemingly insurmountable challenges of playing basketball in a state that was a bastion for not only the game but also the Ku Klux Klan.<br> Veteran sportswriter and the bestselling author of <i>Dream Team</i>, Jack McCallum, pulls back the curtain on that history, which is rich, far beyond the basketball court. <i>The Real Hoosiers</i> replaces a lacuna in the history of Indiana while dissecting the myths and lore of <i>Hoosier</i> hoops; placing the game in the context of migration, segregation, and integration; and enhancing our understanding of this country's struggle for civil rights.", "short": "<b>The true story behind Crispus Attucks High School and the all-Black basketball team loosely depicted as the championship opponent in the beloved classic sports movie <i>Hoosiers</i>.</b><br> <br> For far too long the mythology of Indiana basketball has been dominated by <i>Hoosiers</i>. Framed as the ultimate underdog, feel-good story, there has also long been a cultural debate surrounding the film. The Real Hoosiers sets out to illuminate the narrative that the film omits, the story of the unheralded Crispus Attucks Tigers, playing the game at the highest level in the 1950s in a racially divided Indiana.<br> After a crushing loss to Milan High School in the 1954 semifinal, which was the game that the final scenes in <i>Hoosiers </i>are based on, Attucks went on to win back-to-back Indiana state championships. That team was led by a young Oscar Robertson and coached by Ray Crowe, who fully recognized the seemingly insurmountable challenges of playing basketball in a state..." }, "coverUrl": "/_d/cover/buid/c0950e2ae3a27b44bbb736da7df162f7/big.jpg", "creator": [ { "name": "Jack McCallum", "role": "author", "bio": "" }, { "name": "Cary Hite", "role": "narrator", "bio": "" } ], "spine": [ { "duration": 4626.024375, "type": "audio/mpeg", "bitrate": 64 }, { "duration": 4215.275, "type": "audio/mpeg", "bitrate": 64 }, { "duration": 3883.781125, "type": "audio/mpeg", "bitrate": 64 }, { "duration": 4016.222, "type": "audio/mpeg", "bitrate": 64 }, { "duration": 3621.61625, "type": "audio/mpeg", "bitrate": 64 }, { "duration": 3179.493875, "type": "audio/mpeg", "bitrate": 64 }, { "duration": 4356.466875, "type": "audio/mpeg", "bitrate": 64 }, { "duration": 4125.231, "type": "audio/mpeg", "bitrate": 64 }, { "duration": 4709.0155, "type": "audio/mpeg", "bitrate": 64 } ], "chapters": [ { "title": "Opening", "spine": 0, "offset": 0 }, { "title": "Quote", "spine": 0, "offset": 33 }, { "title": "Prologue", "spine": 0, "offset": 39 }, { "title": "Chapter 1", "spine": 0, "offset": 124 }, { "title": "Chapter 1, continued", "spine": 0, "offset": 1399 }, { "title": "Chapter 2", "spine": 0, "offset": 2911 }, { "title": "Chapter 3", "spine": 1, "offset": 0 }, { "title": "Chapter 4", "spine": 1, "offset": 2539 }, { "title": "Chapter 5", "spine": 2, "offset": 0 }, { "title": "Chapter 6", "spine": 2, "offset": 2308 }, { "title": "Chapter 7", "spine": 3, "offset": 0 }, { "title": "Chapter 8", "spine": 3, "offset": 2497 }, { "title": "Chapter 9", "spine": 4, "offset": 0 }, { "title": "Chapter 10", "spine": 4, "offset": 2276 }, { "title": "Chapter 11", "spine": 5, "offset": 0 }, { "title": "Chapter 12", "spine": 5, "offset": 1897 }, { "title": "Chapter 13", "spine": 6, "offset": 0 }, { "title": "Chapter 14", "spine": 6, "offset": 1726 }, { "title": "Chapter 15", "spine": 6, "offset": 2826 }, { "title": "Chapter 16", "spine": 7, "offset": 0 }, { "title": "Chapter 17", "spine": 7, "offset": 2521 }, { "title": "Chapter 18", "spine": 8, "offset": 0 }, { "title": "Chapter 19", "spine": 8, "offset": 1992 }, { "title": "Acknowledgments", "spine": 8, "offset": 4080 }, { "title": "Closing", "spine": 8, "offset": 4606 } ] } ``` ### Audiobookshelf version v2.21.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell 2025-05-14 04:02:19.925 ERROR [abmetadataGenerator] Invalid chapter start time undefined for "The Real Hoosiers" metadata file 2025-05-14 04:02:19.931 ERROR [LibraryScanner] Library scan 369f7763-3560-40d2-a4a2-b02f767fed44 failed after 0:00 | 0 Added | 0 Updated | 0 Missing. ValidationError [SequelizeValidationError]: string violation: description cannot be an array or an object at InstanceValidator._validate (/node_modules/sequelize/lib/instance-validator.js:50:13) at async InstanceValidator._validateAndRunHooks (/node_modules/sequelize/lib/instance-validator.js:60:7) at async InstanceValidator.validate (/node_modules/sequelize/lib/instance-validator.js:54:12) at async Book.save (/node_modules/sequelize/lib/model.js:2426:7) at async /node_modules/sequelize/lib/model.js:2465:9 at async Promise.all (index 0) at async LibraryItem.save (/node_modules/sequelize/lib/model.js:2456:7) at async libraryItem.create (/node_modules/sequelize/lib/model.js:1362:12) at async BookScanner.scanNewBookLibraryItem (/server/scanner/BookScanner.js:563:25) at async LibraryItemScanner.scanNewLibraryItem (/server/scanner/LibraryItemScanner.js:188:24) { errors: [ ValidationErrorItem { message: 'description cannot be an array or an object', type: 'string violation', path: 'description', value: [Object], origin: 'CORE', instance: [book], validatorKey: 'not_a_string', validatorName: null, validatorArgs: [] } ] } ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:10:19 +02:00
adam closed this issue 2026-04-25 00:10:19 +02:00
Author
Owner

@bilogic commented on GitHub (May 14, 2025):

Correction, the metadata.json was not generated to audiobookshelf standards. Closing. Thank you.

@bilogic commented on GitHub (May 14, 2025): Correction, the metadata.json was not generated to audiobookshelf standards. Closing. Thank you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2767