Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APPLICATION ERROR : a server-side exception has occurred (see the server logs for more information). #887

Open
1 task done
GAC-Machine opened this issue Jan 15, 2025 · 2 comments
Labels
question Further information is requested

Comments

@GAC-Machine
Copy link

GAC-Machine commented Jan 15, 2025

Describe the Bug

That's the error I get when I try to use Hoader app.

Installation: Docker Image
OS: Windows 11 Pro

Log

2025-01-15 18:47:46 [next-auth][error][NO_SECRET] 
2025-01-15 18:47:46 https://next-auth.js.org/errors#no_secret Please define a `secret` in production. r [MissingSecretError]: Please define a `secret` in production.
2025-01-15 18:47:46     at t.assertConfig (/app/apps/web/.next/server/chunks/8195.js:3:20299)
2025-01-15 18:47:46     at m (/app/apps/web/.next/server/chunks/8195.js:3:13662)
2025-01-15 18:47:46     at async a (/app/apps/web/.next/server/chunks/8195.js:27:20595)
2025-01-15 18:47:46     at async a (/app/apps/web/.next/server/app/page.js:1:2960) {
2025-01-15 18:47:46   code: 'NO_SECRET'
2025-01-15 18:47:46 }
2025-01-15 18:47:46 [next-auth][error][NO_SECRET] 
2025-01-15 18:47:46 https://next-auth.js.org/errors#no_secret Please define a `secret` in production. r [MissingSecretError]: Please define a `secret` in production.
2025-01-15 18:47:46     at t.assertConfig (/app/apps/web/.next/server/chunks/8195.js:3:20299)
2025-01-15 18:47:46     at m (/app/apps/web/.next/server/chunks/8195.js:3:13662)
2025-01-15 18:47:46     at async a (/app/apps/web/.next/server/chunks/8195.js:27:20595)
2025-01-15 18:47:46     at async h (/app/apps/web/.next/server/chunks/350.js:1:10745) {
2025-01-15 18:47:46   code: 'NO_SECRET'
2025-01-15 18:47:46 }
2025-01-15 18:47:46 Error: There is a problem with the server configuration. Check the server logs for more information.
2025-01-15 18:47:46     at a (/app/apps/web/.next/server/chunks/8195.js:27:20843)
2025-01-15 18:47:46     at async a (/app/apps/web/.next/server/app/page.js:1:2960) {
2025-01-15 18:47:46   digest: '1111914970'
2025-01-15 18:47:46 }
2025-01-15 18:47:46 Error: There is a problem with the server configuration. Check the server logs for more information.
2025-01-15 18:47:46     at a (/app/apps/web/.next/server/chunks/8195.js:27:20843)
2025-01-15 18:47:46     at async h (/app/apps/web/.next/server/chunks/350.js:1:10745) {
2025-01-15 18:47:46   digest: '2833486469'
2025-01-15 18:47:46 }
2025-01-15 18:47:46 Error: There is a problem with the server configuration. Check the server logs for more information.
2025-01-15 18:47:46     at a (/app/apps/web/.next/server/chunks/8195.js:27:20843)
2025-01-15 18:47:46     at async h (/app/apps/web/.next/server/chunks/350.js:1:10745) {
2025-01-15 18:47:46   digest: '2833486469'
2025-01-15 18:47:46 }
2025-01-15 18:47:47 [next-auth][error][NO_SECRET] 
2025-01-15 18:47:47 https://next-auth.js.org/errors#no_secret Please define a `secret` in production. r [MissingSecretError]: Please define a `secret` in production.
2025-01-15 18:47:47     at t.assertConfig (/app/apps/web/.next/server/chunks/8195.js:3:20299)
2025-01-15 18:47:47     at m (/app/apps/web/.next/server/chunks/8195.js:3:13662)
2025-01-15 18:47:47     at async a (/app/apps/web/.next/server/chunks/8195.js:27:20595)
2025-01-15 18:47:47     at async h (/app/apps/web/.next/server/chunks/350.js:1:10745) {
2025-01-15 18:47:47   code: 'NO_SECRET'
2025-01-15 18:47:47 }
2025-01-15 18:47:47 Error: There is a problem with the server configuration. Check the server logs for more information.
2025-01-15 18:47:47     at a (/app/apps/web/.next/server/chunks/8195.js:27:20843)
2025-01-15 18:47:47     at async h (/app/apps/web/.next/server/chunks/350.js:1:10745) {
2025-01-15 18:47:47   digest: '2833486469'
2025-01-15 18:47:47 }
2025-01-15 18:47:47 Error: There is a problem with the server configuration. Check the server logs for more information.
2025-01-15 18:47:47     at a (/app/apps/web/.next/server/chunks/8195.js:27:20843)
2025-01-15 18:47:47     at async h (/app/apps/web/.next/server/chunks/350.js:1:10745) {
2025-01-15 18:47:47   digest: '2833486469'
2025-01-15 18:47:47 }

Steps to Reproduce

Basically follow the official docs installation page.

  1. On your profile directory (typically the path is C:\Users\[name])) create a new directory to host the compose file .yml and .env variables files by using mkdir hoarder command.
  2. In this folder create .env file and .yml file and fill in each with following information:

.env file

HOARDER_VERSION=latest
NEXTAUTH_SECRET=super_random_string
MEILI_MASTER_KEY=another_random_string
NEXTAUTH_URL=http://localhost:3000
OLLAMA_BASE_URL=#<Ollama-API> #I don't know
INFERENCE_TEXT_MODEL=llama3.2
INFERENCE_IMAGE_MODEL=llava #not sure about it
INFERENCE_CONTEXT_LENGTH=100 #optional I haven't tested if it a good value. No info provided

NOTE
In documentation openssl is mentioned to be used to generate such random strings with openssl rand -base64 36 command.
I've no idea how to use it.

docker-compose.yml file

version: "3.8"
services:
  web:
    image: ghcr.io/hoarder-app/hoarder:${HOARDER_VERSION:-release}
    restart: unless-stopped
    volumes:
      - data:/data
    ports:
      - 32768:32768
    env_file:
      - .env
    environment:
      MEILI_ADDR: http://meilisearch:7700
      BROWSER_WEB_URL: http://chrome:9222
      # OPENAI_API_KEY: ...
      DATA_DIR: /data
  chrome:
    image: gcr.io/zenika-hub/alpine-chrome:123
    restart: unless-stopped
    command:
      - --no-sandbox
      - --disable-gpu
      - --disable-dev-shm-usage
      - --remote-debugging-address=0.0.0.0
      - --remote-debugging-port=9222
      - --hide-scrollbars
  meilisearch:
    image: getmeili/meilisearch:v1.11.1
    restart: unless-stopped
    env_file:
      - .env
    environment:
      MEILI_NO_ANALYTICS: "true"
    volumes:
      - meilisearch:/meili_data

volumes:
  meilisearch:
  data:

What about AI assistant to enable automatic tagging ?

I know about OpenAI which requires an API key and that all I need is to set in .env file
OPENAI_API_KEY=<key>

What about ollama, a local LLM ?
I installed (https://ollama.com/download) it. I can use it via cmd prompt.
All works fine.
No instructions about how to get ollama API .

  1. launch container in Docker for Windows (by giving it a name (eg Hoarder) and set port to be used (eg 0 for auto-assignment).

Expected Behaviour

It should load login page where you can enter login and password.

Screenshots or Additional Context

No response

Device Details

Windows 11 Pro (tested both with Firefox 134.0.1 and Brave 1.73.105).

Exact Hoarder Version

N/A Idk.

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem.
@MohamedBassem MohamedBassem added the question Further information is requested label Jan 18, 2025
@MohamedBassem
Copy link
Collaborator

Regarding the NO_SECRET error it mean that the NEXTAUTH_SECRET is not correctly set. Either your env file is not correctly read, or you forgot to update docker compose after adding it or something.

For ollama, you'll have to put the address of the server running ollama. Typically, people use http://host.docker.internal:11343 but I don't know if this is going to work on windows unfortunately.

@unff
Copy link

unff commented Jan 22, 2025

Are you running this via portainer and importing the .env file? I'd assume you are, since I had the same exact error stack before I recognized my flaw.

The solution is to update the docker-compose.yml file to point to the generated Portainer env file 'stack.env':

This bit:

env_file:
      - .env

becomes:

env_file:
      - stack.env

when working in portainer. Don't forget to update the filename in both places (I may have made that mistake too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants