[GH-ISSUE #44] MeiliSearchApiError: The Authorization header is missing. It must use the bearer authorization method. #40

Closed
opened 2026-03-02 11:45:59 +03:00 by kerem · 4 comments
Owner

Originally created by @Aerics84 on GitHub (Mar 29, 2024).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/44

I have this error inside the Hoarder-WORKERS container:
openai job failed: MeiliSearchApiError: The Authorization header is missing. It must use the bearer authorization method.

And i get this error inside the Hoarder-MEILI container:

MeiliSearchApiError: The Authorization header is missing. It must use the bearer authorization method.
    at /app/apps/web/.next/server/chunks/673.js:4817:1188
    ... 2 lines matching cause stack trace ...
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: INTERNAL_SERVER_ERROR',
  name: 'TRPCError',
  [cause]: l [MeiliSearchApiError]: The Authorization header is missing. It must use the bearer authorization method.
      at /app/apps/web/.next/server/chunks/673.js:4817:1188
      at Generator.next (<anonymous>)
      at s (/app/apps/web/.next/server/chunks/673.js:4815:69399)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    code: 'missing_authorization_header',
    type: 'auth',
    link: 'https://docs.meilisearch.com/errors#missing_authorization_header',
    httpStatus: 401
  }
}
Originally created by @Aerics84 on GitHub (Mar 29, 2024). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/44 I have this error inside the Hoarder-WORKERS container: **openai job failed: MeiliSearchApiError: The Authorization header is missing. It must use the bearer authorization method.** And i get this error inside the Hoarder-MEILI container: ``` MeiliSearchApiError: The Authorization header is missing. It must use the bearer authorization method. at /app/apps/web/.next/server/chunks/673.js:4817:1188 ... 2 lines matching cause stack trace ... at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: INTERNAL_SERVER_ERROR', name: 'TRPCError', [cause]: l [MeiliSearchApiError]: The Authorization header is missing. It must use the bearer authorization method. at /app/apps/web/.next/server/chunks/673.js:4817:1188 at Generator.next (<anonymous>) at s (/app/apps/web/.next/server/chunks/673.js:4815:69399) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'missing_authorization_header', type: 'auth', link: 'https://docs.meilisearch.com/errors#missing_authorization_header', httpStatus: 401 } } ```
kerem closed this issue 2026-03-02 11:45:59 +03:00
Author
Owner

@MohamedBassem commented on GitHub (Mar 29, 2024):

Did you setup the required env variables here (https://docs.hoarder.app/installation#3-populate-the-environment-variables)?
Seems like you're probably missing the MEILI_MASTER_KEY var.

<!-- gh-comment-id:2027486982 --> @MohamedBassem commented on GitHub (Mar 29, 2024): Did you setup the required env variables here (https://docs.hoarder.app/installation#3-populate-the-environment-variables)? Seems like you're probably missing the `MEILI_MASTER_KEY` var.
Author
Owner

@Aerics84 commented on GitHub (Mar 29, 2024):

version: "3.9"
services:
  web:
    image: ghcr.io/mohamedbassem/hoarder-web:latest
    container_name: Hoarder-WEB
    restart: on-failure:5
    volumes:
      - /volume1/docker/hoarder/data:/data:rw
    ports:
      - 8096:3000
    networks:
      - hoarder      
    environment:
      REDIS_HOST: redis
      MEILI_ADDR: http://meilisearch:7700
      DATA_DIR: /data
      NEXTAUTH_SECRET: SaTLKAn^Xe*j2&35@m!Ln!AgK3uXXXXX
      
  redis:
    image: redis:7.2-alpine
    container_name: Hoarder-REDIS
    restart: on-failure:5
    volumes:
      - /volume1/docker/hoarder/redis:/data:rw
    networks:
      - hoarder      
      
  chrome:
    image: gcr.io/zenika-hub/alpine-chrome:100
    container_name: Hoarder-CHROME
    restart: on-failure:5
    networks:
      - hoarder    
    command:
      - --no-sandbox
      - --disable-gpu
      - --remote-debugging-address=0.0.0.0
      - --remote-debugging-port=9222
      
  meilisearch:
    image: getmeili/meilisearch:v1.6
    container_name: Hoarder-MEILI
    restart: unless-stopped
    volumes:
      - /volume1/docker/hoarder/meili:/meili_data:rw
    networks:
      - hoarder      
    environment:
     MEILI_MASTER_KEY: q3D6WN&Sqtz^tu*%KK2GaAcnt9fXXXXX
     
  workers:
    image: ghcr.io/mohamedbassem/hoarder-workers:latest
    container_name: Hoarder-WORKERS
    restart: on-failure:5
    volumes:
      - /volume1/docker/hoarder/data:/data:rw
    networks:
      - hoarder      
    environment:
      REDIS_HOST: redis
      MEILI_ADDR: http://meilisearch:7700
      BROWSER_WEB_URL: http://chrome:9222
      NEXTAUTH_SECRET: SaTLKAn^Xe*j2&35@m!Ln!AgK3uXXXXX
      DATA_DIR: /data
      OPENAI_API_KEY: sk-XXXXX
    depends_on:
      web:
        condition: service_started

networks:
  hoarder:
    external: true
<!-- gh-comment-id:2027494636 --> @Aerics84 commented on GitHub (Mar 29, 2024): ``` version: "3.9" services: web: image: ghcr.io/mohamedbassem/hoarder-web:latest container_name: Hoarder-WEB restart: on-failure:5 volumes: - /volume1/docker/hoarder/data:/data:rw ports: - 8096:3000 networks: - hoarder environment: REDIS_HOST: redis MEILI_ADDR: http://meilisearch:7700 DATA_DIR: /data NEXTAUTH_SECRET: SaTLKAn^Xe*j2&35@m!Ln!AgK3uXXXXX redis: image: redis:7.2-alpine container_name: Hoarder-REDIS restart: on-failure:5 volumes: - /volume1/docker/hoarder/redis:/data:rw networks: - hoarder chrome: image: gcr.io/zenika-hub/alpine-chrome:100 container_name: Hoarder-CHROME restart: on-failure:5 networks: - hoarder command: - --no-sandbox - --disable-gpu - --remote-debugging-address=0.0.0.0 - --remote-debugging-port=9222 meilisearch: image: getmeili/meilisearch:v1.6 container_name: Hoarder-MEILI restart: unless-stopped volumes: - /volume1/docker/hoarder/meili:/meili_data:rw networks: - hoarder environment: MEILI_MASTER_KEY: q3D6WN&Sqtz^tu*%KK2GaAcnt9fXXXXX workers: image: ghcr.io/mohamedbassem/hoarder-workers:latest container_name: Hoarder-WORKERS restart: on-failure:5 volumes: - /volume1/docker/hoarder/data:/data:rw networks: - hoarder environment: REDIS_HOST: redis MEILI_ADDR: http://meilisearch:7700 BROWSER_WEB_URL: http://chrome:9222 NEXTAUTH_SECRET: SaTLKAn^Xe*j2&35@m!Ln!AgK3uXXXXX DATA_DIR: /data OPENAI_API_KEY: sk-XXXXX depends_on: web: condition: service_started networks: hoarder: external: true ```
Author
Owner

@MohamedBassem commented on GitHub (Mar 29, 2024):

MEILI_MASTER_KEY needs to be set up on the web and workers containers as well

EDIT: With the same value in the three containers.

<!-- gh-comment-id:2027495690 --> @MohamedBassem commented on GitHub (Mar 29, 2024): MEILI_MASTER_KEY needs to be set up on the `web` and `workers` containers as well EDIT: With the same value in the three containers.
Author
Owner

@Aerics84 commented on GitHub (Mar 29, 2024):

Thats it. Thanks.

<!-- gh-comment-id:2027504958 --> @Aerics84 commented on GitHub (Mar 29, 2024): Thats it. 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/karakeep#40
No description provided.