[Bug]: Error in logs after switching config folder to another container #1039

Closed
opened 2026-04-24 23:29:40 +02:00 by adam · 2 comments
Owner

Originally created by @TroLoos on GitHub (Mar 29, 2023).

Describe the issue

I've created a separate docker container to set up my new library. After I finished, I destroyed this container and created a new one, pointing to config folders of the other one. Now, everything seems to work fine, except for the error in container logs:

[2023-03-29 00:24:31] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature
at /server/libs/jsonwebtoken/verify.js:133:19
at getSecret (/server/libs/jsonwebtoken/verify.js:90:14)
at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10)
at /server/Auth.js:107:11
at new Promise ()
at Auth.verifyToken (/server/Auth.js:106:12)
at Auth.authenticateUser (/server/Auth.js:102:17)
at SocketAuthority.authenticateSocket (/server/SocketAuthority.js:143:41)
at Socket. (/server/SocketAuthority.js:88:41)
at Socket.emit (node:events:513:28) (Auth.js:109)
[2023-03-29 00:24:31] ERROR: Cannot validate socket - invalid token (SocketAuthority.js:145)

Steps to reproduce the issue

  1. Set up a library with temporary docker container.
  2. After finishing, create another one pointing to config folders from our temp container.

Audiobookshelf version

v2.2.17

How are you running audiobookshelf?

Docker

Originally created by @TroLoos on GitHub (Mar 29, 2023). ### Describe the issue I've created a separate docker container to set up my new library. After I finished, I destroyed this container and created a new one, pointing to config folders of the other one. Now, everything seems to work fine, except for the error in container logs: [2023-03-29 00:24:31] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature at /server/libs/jsonwebtoken/verify.js:133:19 at getSecret (/server/libs/jsonwebtoken/verify.js:90:14) at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10) at /server/Auth.js:107:11 at new Promise (<anonymous>) at Auth.verifyToken (/server/Auth.js:106:12) at Auth.authenticateUser (/server/Auth.js:102:17) at SocketAuthority.authenticateSocket (/server/SocketAuthority.js:143:41) at Socket.<anonymous> (/server/SocketAuthority.js:88:41) at Socket.emit (node:events:513:28) (Auth.js:109) [2023-03-29 00:24:31] ERROR: Cannot validate socket - invalid token (SocketAuthority.js:145) ### Steps to reproduce the issue 1. Set up a library with temporary docker container. 2. After finishing, create another one pointing to config folders from our temp container. ### Audiobookshelf version v2.2.17 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:29:40 +02:00
adam closed this issue 2026-04-24 23:29:40 +02:00
Author
Owner

@advplyr commented on GitHub (Mar 29, 2023):

Are you able to login? When you started the new server did you have to create a new user?
Do you have multiple users that you switch between?

This error is usually because the auth token stored in local storage used to auto-connect was for a different user. It is not something to worry about it unless it is continually happening on the same browser/device every time you connect.

@advplyr commented on GitHub (Mar 29, 2023): Are you able to login? When you started the new server did you have to create a new user? Do you have multiple users that you switch between? This error is usually because the auth token stored in local storage used to auto-connect was for a different user. It is not something to worry about it unless it is continually happening on the same browser/device every time you connect.
Author
Owner

@TroLoos commented on GitHub (Mar 29, 2023):

Are you able to login? When you started the new server did you have to create a new user? Do you have multiple users that you switch between?

Yes, I'm able to login. My new server pulled user data from the old container. I re-created all the user except for the root (in my case it's a different name) because it is not possible.

This error is usually because the auth token stored in local storage used to auto-connect was for a different user. It is not something to worry about it unless it is continually happening on the same browser/device every time you connect.

Ok, got it. Truth is that it does not affect my application. This error shows up right after container booting, long before anyone tries to log in, take a look here:

[2023-03-29 09:25:59] INFO: === Starting Server === [2023-03-29 09:25:59] INFO: [Server] Init v2.2.17 [2023-03-29 09:25:59] INFO: [DB] 0 Collections Loaded [2023-03-29 09:25:59] INFO: [DB] 0 Playlists Loaded [2023-03-29 09:25:59] INFO: [DB] 1 Libraries Loaded [2023-03-29 09:25:59] INFO: [DB] 4 Users Loaded [2023-03-29 09:25:59] INFO: [DB] 7 Authors Loaded [2023-03-29 09:25:59] INFO: [DB] 7 Series Loaded [2023-03-29 09:25:59] INFO: [DB] 36 Library Items Loaded [2023-03-29 09:25:59] INFO: [BackupManager] 1 Backups Found [2023-03-29 09:25:59] INFO: [LogManager] Init current daily log filename: 2023-03-29.txt [2023-03-29 09:25:59] INFO: [Watcher] Initializing watcher for "Audiobooks". [2023-03-29 09:25:59] INFO: Listening on port :80 [2023-03-29 09:26:00] INFO: [Watcher] "Audiobooks" Ready [2023-03-29 09:26:00] INFO: [Server] Socket Connected NLgfVeJmqXypDBBsAAAB [2023-03-29 09:26:00] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature at /server/libs/jsonwebtoken/verify.js:133:19 at getSecret (/server/libs/jsonwebtoken/verify.js:90:14) at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10) at /server/Auth.js:107:11 at new Promise (<anonymous>) at Auth.verifyToken (/server/Auth.js:106:12) at Auth.authenticateUser (/server/Auth.js:102:17) at SocketAuthority.authenticateSocket (/server/SocketAuthority.js:143:41) at Socket.<anonymous> (/server/SocketAuthority.js:88:41) at Socket.emit (node:events:513:28) (Auth.js:109)

I am actually happy with your answer that it doesn't really affect anything and I can live. with that error. This appliaction is great and I wanted to let developers know about it so that it can be even better and bullet proof :-).

@TroLoos commented on GitHub (Mar 29, 2023): > Are you able to login? When you started the new server did you have to create a new user? Do you have multiple users that you switch between? Yes, I'm able to login. My new server pulled user data from the old container. I re-created all the user except for the root (in my case it's a different name) because it is not possible. > This error is usually because the auth token stored in local storage used to auto-connect was for a different user. It is not something to worry about it unless it is continually happening on the same browser/device every time you connect. Ok, got it. Truth is that it does not affect my application. This error shows up right after container booting, long before anyone tries to log in, take a look here: ` [2023-03-29 09:25:59] INFO: === Starting Server === [2023-03-29 09:25:59] INFO: [Server] Init v2.2.17 [2023-03-29 09:25:59] INFO: [DB] 0 Collections Loaded [2023-03-29 09:25:59] INFO: [DB] 0 Playlists Loaded [2023-03-29 09:25:59] INFO: [DB] 1 Libraries Loaded [2023-03-29 09:25:59] INFO: [DB] 4 Users Loaded [2023-03-29 09:25:59] INFO: [DB] 7 Authors Loaded [2023-03-29 09:25:59] INFO: [DB] 7 Series Loaded [2023-03-29 09:25:59] INFO: [DB] 36 Library Items Loaded [2023-03-29 09:25:59] INFO: [BackupManager] 1 Backups Found [2023-03-29 09:25:59] INFO: [LogManager] Init current daily log filename: 2023-03-29.txt [2023-03-29 09:25:59] INFO: [Watcher] Initializing watcher for "Audiobooks". [2023-03-29 09:25:59] INFO: Listening on port :80 [2023-03-29 09:26:00] INFO: [Watcher] "Audiobooks" Ready [2023-03-29 09:26:00] INFO: [Server] Socket Connected NLgfVeJmqXypDBBsAAAB [2023-03-29 09:26:00] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature at /server/libs/jsonwebtoken/verify.js:133:19 at getSecret (/server/libs/jsonwebtoken/verify.js:90:14) at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10) at /server/Auth.js:107:11 at new Promise (<anonymous>) at Auth.verifyToken (/server/Auth.js:106:12) at Auth.authenticateUser (/server/Auth.js:102:17) at SocketAuthority.authenticateSocket (/server/SocketAuthority.js:143:41) at Socket.<anonymous> (/server/SocketAuthority.js:88:41) at Socket.emit (node:events:513:28) (Auth.js:109) ` I am actually happy with your answer that it doesn't really affect anything and I can live. with that error. This appliaction is great and I wanted to let developers know about it so that it can be even better and bullet proof :-).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1039