[Bug]: Error in v2.8.1 #1825

Closed
opened 2026-04-24 23:59:15 +02:00 by adam · 12 comments
Owner

Originally created by @ameer1234567890 on GitHub (Mar 18, 2024).

Describe the issue

I am getting below error with v2.8.1.

node:internal/modules/cjs/loader:1456
    throw err;
    ^
SyntaxError: /node_modules/mime-db/db.json: Unterminated string in JSON at position 185882
    at parse (<anonymous>)
    at Module._extensions..json (node:internal/modules/cjs/loader:1453:39)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/node_modules/mime-db/index.js:12:18)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
Node.js v20.11.1

PS: The previous release version still works well for me.

Steps to reproduce the issue

  1. Update to v2.8.1
  2. Start container

Audiobookshelf version

v2.8.1

How are you running audiobookshelf?

Docker

Originally created by @ameer1234567890 on GitHub (Mar 18, 2024). ### Describe the issue I am getting below error with [v2.8.1](https://github.com/advplyr/audiobookshelf/releases/tag/v2.8.1). ``` node:internal/modules/cjs/loader:1456 throw err; ^ SyntaxError: /node_modules/mime-db/db.json: Unterminated string in JSON at position 185882 at parse (<anonymous>) at Module._extensions..json (node:internal/modules/cjs/loader:1453:39) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at Object.<anonymous> (/node_modules/mime-db/index.js:12:18) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) Node.js v20.11.1 ``` PS: The previous release version still works well for me. ### Steps to reproduce the issue 1. Update to v2.8.1 2. Start container ### Audiobookshelf version v2.8.1 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:59:15 +02:00
adam closed this issue 2026-04-24 23:59:15 +02:00
Author
Owner

@advplyr commented on GitHub (Mar 18, 2024):

Can you share the logs that led up to that crash?

@advplyr commented on GitHub (Mar 18, 2024): Can you share the logs that led up to that crash?
Author
Owner

@ameer1234567890 commented on GitHub (Mar 19, 2024):

This is the full log

@ameer1234567890 commented on GitHub (Mar 19, 2024): This is the full log
Author
Owner

@nichwall commented on GitHub (Mar 19, 2024):

Looks like one of your json files may be malformed? If you attached additional logs to your response they didn't get attached.

@nichwall commented on GitHub (Mar 19, 2024): Looks like one of your json files may be malformed? If you attached additional logs to your response they didn't get attached.
Author
Owner

@ameer1234567890 commented on GitHub (Mar 19, 2024):

It's not my json file. It's a json file in the node_modules directory.

@ameer1234567890 commented on GitHub (Mar 19, 2024): It's not my json file. It's a json file in the node_modules directory.
Author
Owner

@advplyr commented on GitHub (Mar 19, 2024):

Is there any more information you can share? At this time it's not enough to take any action with

@advplyr commented on GitHub (Mar 19, 2024): Is there any more information you can share? At this time it's not enough to take any action with
Author
Owner

@ameer1234567890 commented on GitHub (Mar 20, 2024):

I tried doing a clean docker compose without any bind mounts or volumes, and this is the complete log which I get.

node:internal/modules/cjs/loader:1456
    throw err;
    ^
SyntaxError: /node_modules/mime-db/db.json: Unterminated string in JSON at position 185882
    at parse (<anonymous>)
    at Module._extensions..json (node:internal/modules/cjs/loader:1453:39)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/node_modules/mime-db/index.js:12:18)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
Node.js v20.11.1
@ameer1234567890 commented on GitHub (Mar 20, 2024): I tried doing a clean docker compose without any bind mounts or volumes, and this is the complete log which I get. ``` node:internal/modules/cjs/loader:1456 throw err; ^ SyntaxError: /node_modules/mime-db/db.json: Unterminated string in JSON at position 185882 at parse (<anonymous>) at Module._extensions..json (node:internal/modules/cjs/loader:1453:39) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at Object.<anonymous> (/node_modules/mime-db/index.js:12:18) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) Node.js v20.11.1 ```
Author
Owner

@ameer1234567890 commented on GitHub (Mar 23, 2024):

I looked into the file being referenced by the error message: /node_modules/mime-db/db.json and it seems to be truncated and thus not valid json. The container keeps restarting after the error message and it is in a restart loop.

@ameer1234567890 commented on GitHub (Mar 23, 2024): I looked into the file being referenced by the error message: `/node_modules/mime-db/db.json` and it seems to be truncated and thus not valid json. The container keeps restarting after the error message and it is in a restart loop.
Author
Owner

@advplyr commented on GitHub (Mar 23, 2024):

What path are you using to get the docker image?

@advplyr commented on GitHub (Mar 23, 2024): What path are you using to get the docker image?
Author
Owner

@ameer1234567890 commented on GitHub (Mar 24, 2024):

This is my compose file:

version: "3.7"

services:
  audiobookshelf:
    image: ghcr.io/advplyr/audiobookshelf:2.8.0
    container_name: audiobookshelf
    ports:
      - 13378:80
    volumes:
      - /home/pi/Audiobooks:/audiobooks
      - /home/pi/docker/audiobookshelf/metadata:/metadata
      - /home/pi/docker/audiobookshelf/config:/config
    restart: unless-stopped
    environment:
      - user=1000:1000
    healthcheck:
           test: wget --spider http://localhost || exit 1
@ameer1234567890 commented on GitHub (Mar 24, 2024): This is my compose file: ``` version: "3.7" services: audiobookshelf: image: ghcr.io/advplyr/audiobookshelf:2.8.0 container_name: audiobookshelf ports: - 13378:80 volumes: - /home/pi/Audiobooks:/audiobooks - /home/pi/docker/audiobookshelf/metadata:/metadata - /home/pi/docker/audiobookshelf/config:/config restart: unless-stopped environment: - user=1000:1000 healthcheck: test: wget --spider http://localhost || exit 1 ```
Author
Owner

@nichwall commented on GitHub (Mar 24, 2024):

I just tried using a brand new container (no volumes, everything local to the container) and making a new container with a copy of my data. I am not seeing this behavior in either case.

version: "3.7"
services:
  audiobookshelf:
    image: ghcr.io/advplyr/audiobookshelf:2.8.1
    ports:
      - 13390:80
# with and without following volumes
    volumes:
      - /volume1/docker/audiobookshelf/audiobooks:/audiobooks
      - /volume1/docker/audiobookshelf/podcasts:/podcasts
      - /volume1/docker/audiobookshelf/config:/config
      - /volume1/docker/audiobookshelf/metadata:/metadata
@nichwall commented on GitHub (Mar 24, 2024): I just tried using a brand new container (no volumes, everything local to the container) and making a new container with a copy of my data. I am not seeing this behavior in either case. ``` version: "3.7" services: audiobookshelf: image: ghcr.io/advplyr/audiobookshelf:2.8.1 ports: - 13390:80 # with and without following volumes volumes: - /volume1/docker/audiobookshelf/audiobooks:/audiobooks - /volume1/docker/audiobookshelf/podcasts:/podcasts - /volume1/docker/audiobookshelf/config:/config - /volume1/docker/audiobookshelf/metadata:/metadata ```
Author
Owner

@ameer1234567890 commented on GitHub (Mar 24, 2024):

I re-pulled the image and it works. Seems like a corrupt image. Please accept my sincere apologies for having to put up with me.

@ameer1234567890 commented on GitHub (Mar 24, 2024): I re-pulled the image and it works. Seems like a corrupt image. Please accept my sincere apologies for having to put up with me.
Author
Owner

@nichwall commented on GitHub (Mar 24, 2024):

No worries, glad you got it figured out.

@nichwall commented on GitHub (Mar 24, 2024): No worries, glad you got it figured out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1825