[BUG] 500 JSON error after install #103

Closed
opened 2026-02-19 23:05:12 -05:00 by deekerman · 4 comments
Owner

Originally created by @Node815 on GitHub (Jun 21, 2022).

After fresh install following the readme.md here, I get a JSON error upon loading the URL for the first time:

500

Unexpected token < in JSON at position 0

SyntaxError: Unexpected token < in JSON at position 0

The error in the web server container is as follows:

today at 10:43:51 AMListening on 0.0.0.0:3000
today at 10:43:55 AMSyntaxError: Unexpected token < in JSON at position 0
today at 10:43:55 AM    at JSON.parse (<anonymous>)
today at 10:43:55 AM    at Proxy.<anonymous> (file:///usr/src/app/build/server/index.js:1586:29)
today at 10:43:55 AM    at processTicksAndRejections (node:internal/process/task_queues:96:5)
today at 10:43:55 AM    at async load (file:///usr/src/app/build/server/entries/pages/index.svelte.js:6:25)
today at 10:43:55 AM    at async load_node (file:///usr/src/app/build/server/index.js:1605:14)
today at 10:43:55 AM    at async respond$1 (file:///usr/src/app/build/server/index.js:1844:20)
today at 10:43:55 AM    at async resolve (file:///usr/src/app/build/server/index.js:2182:105)
today at 10:43:55 AM    at async Object.handle (file:///usr/src/app/build/server/chunks/hooks-31102541.js:7:12)
today at 10:43:55 AM    at async respond (file:///usr/src/app/build/server/index.js:2139:22)
today at 10:43:55 AM    at async Array.ssr (file:///usr/src/app/build/handler-edaaddc2.js:841:3)

I do get the "New version" announcement dialog which works, but it does not show the current version of the installed server.

The Machine learning, Microservice, Server, postgres and redis containers do not show any errors.

Originally created by @Node815 on GitHub (Jun 21, 2022). After fresh install following the readme.md here, I get a JSON error upon loading the URL for the first time: ``` 500 Unexpected token < in JSON at position 0 SyntaxError: Unexpected token < in JSON at position 0 ``` The error in the web server container is as follows: ``` today at 10:43:51 AMListening on 0.0.0.0:3000 today at 10:43:55 AMSyntaxError: Unexpected token < in JSON at position 0 today at 10:43:55 AM at JSON.parse (<anonymous>) today at 10:43:55 AM at Proxy.<anonymous> (file:///usr/src/app/build/server/index.js:1586:29) today at 10:43:55 AM at processTicksAndRejections (node:internal/process/task_queues:96:5) today at 10:43:55 AM at async load (file:///usr/src/app/build/server/entries/pages/index.svelte.js:6:25) today at 10:43:55 AM at async load_node (file:///usr/src/app/build/server/index.js:1605:14) today at 10:43:55 AM at async respond$1 (file:///usr/src/app/build/server/index.js:1844:20) today at 10:43:55 AM at async resolve (file:///usr/src/app/build/server/index.js:2182:105) today at 10:43:55 AM at async Object.handle (file:///usr/src/app/build/server/chunks/hooks-31102541.js:7:12) today at 10:43:55 AM at async respond (file:///usr/src/app/build/server/index.js:2139:22) today at 10:43:55 AM at async Array.ssr (file:///usr/src/app/build/handler-edaaddc2.js:841:3) ``` I do get the "New version" announcement dialog which works, but it does not show the current version of the installed server. The Machine learning, Microservice, Server, postgres and redis containers do not show any errors.
Author
Owner

@alextran1502 commented on GitHub (Jun 21, 2022):

Can you share your .env file?

@alextran1502 commented on GitHub (Jun 21, 2022): Can you share your .env file?
Author
Owner

@Node815 commented on GitHub (Jun 21, 2022):

###################################################################################
# Database
###################################################################################

DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_PASSWORD=postgres  
DB_DATABASE_NAME=immich





###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=immich_redis





###################################################################################
# Upload File Config
###################################################################################

UPLOAD_LOCATION=/mnt/Storage/Gallery




###################################################################################
# JWT SECRET
###################################################################################

JWT_SECRET=REDACTED FOR SHARING!!!  




###################################################################################
# MAPBOX
####################################################################################

# ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY
ENABLE_MAPBOX=false
MAPBOX_KEY=




###################################################################################
# WEB
###################################################################################

# This is the URL of your vm/server where you host Immich, so that the web frontend
# know where can it make the request to.
# For example: If your server IP address is 10.1.11.50, the environment variable will
# be VITE_SERVER_ENDPOINT=http://10.1.11.50:2283
# !CAUTION! THERE IS NO FORWARD SLASH AT THE END

VITE_SERVER_ENDPOINT=http://192.168.1.161
@Node815 commented on GitHub (Jun 21, 2022): ``` ################################################################################### # Database ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_PASSWORD=postgres DB_DATABASE_NAME=immich ################################################################################### # Redis ################################################################################### REDIS_HOSTNAME=immich_redis ################################################################################### # Upload File Config ################################################################################### UPLOAD_LOCATION=/mnt/Storage/Gallery ################################################################################### # JWT SECRET ################################################################################### JWT_SECRET=REDACTED FOR SHARING!!! ################################################################################### # MAPBOX #################################################################################### # ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY ENABLE_MAPBOX=false MAPBOX_KEY= ################################################################################### # WEB ################################################################################### # This is the URL of your vm/server where you host Immich, so that the web frontend # know where can it make the request to. # For example: If your server IP address is 10.1.11.50, the environment variable will # be VITE_SERVER_ENDPOINT=http://10.1.11.50:2283 # !CAUTION! THERE IS NO FORWARD SLASH AT THE END VITE_SERVER_ENDPOINT=http://192.168.1.161 ```
Author
Owner

@alextran1502 commented on GitHub (Jun 21, 2022):

You don't have :2283 include in your VITE_SERVER_ENDPOINT. It will fix your issue, remember to bring the container down and up to register the change

@alextran1502 commented on GitHub (Jun 21, 2022): You don't have :2283 include in your VITE_SERVER_ENDPOINT. It will fix your issue, remember to bring the container down and up to register the change
Author
Owner

@Node815 commented on GitHub (Jun 21, 2022):

Ahhh thanks! I guess I was confused by the statement about the IP address, I though it would auto config the 2283 after the fact. Good to know! I was able to register now and get to exploring your product. Thanks!

@Node815 commented on GitHub (Jun 21, 2022): Ahhh thanks! I guess I was confused by the statement about the IP address, I though it would auto config the 2283 after the fact. Good to know! I was able to register now and get to exploring your product. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#103
No description provided.