rishikanthc / Scriberr

Self-hosted AI audio transcription
https://scriberr.app
MIT License
466 stars 18 forks source link

Error 0.3.0 - Failed to authenticate #36

Open CyberSardinha opened 5 days ago

CyberSardinha commented 5 days ago

I have tried to install the 0.3.0 version and I get this error the first time it runs. I had the 0.2.1 before installed and it did work.

Any ideas what the problem is? I've checked all the password and changed them again and they are correct.

Thanks

"resolve" is imported from external module "chart.js/helpers" but never used in "src/hooks.server.ts". "execSync" and "spawn" are imported from external module "child_process" but never used in "src/lib/wizardQueue.ts" and "src/lib/queue.ts".

node:internal/event_target:1090 process.nextTick(() => { throw err; }); ^ ClientResponseError 400: Failed to authenticate. at file:///app/node_modules/pocketbase/dist/pocketbase.es.mjs:1:32687 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async AdminService.authWithPassword (file:///app/node_modules/pocketbase/dist/pocketbase.es.mjs:1:10912) at async file:///app/.svelte-kit/output/server/chunks/wizardQueue.js:133:1 { url: 'http://192.168.0.2:5170/api/admins/auth-with-password', status: 400, response: { code: 400, message: 'Failed to authenticate.', data: {} }, isAbort: false, originalError: { url: 'http://192.168.0.2:5170/api/admins/auth-with-password', status: 400, data: { code: 400, message: 'Failed to authenticate.', data: {} } } }

Node.js v22.10.0 node:internal/modules/cjs/loader:1252 throw err; ^

Error: Cannot find module '/app/build' at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15) at Function._load (node:internal/modules/cjs/loader:1075:27) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:218:24) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5) at node:internal/main/run_main_module:36:49 { code: 'MODULE_NOT_FOUND', requireStack: [] }

rowanfuchs commented 3 days ago

I've got the same issue.

rowanfuchs commented 3 days ago

So the issue is that the default docker compose doesn't work out of the box, you cant connect to pocketbase if you don't share a network amongst its services and properly name them, please update the documentation, here is my solution:

services:
  scriberr:
    container_name: scriberr
    image: ghcr.io/rishikanthc/scriberr:0.3.0
    # build:
    #  context: .
    #  dockerfile: Dockerfile
    depends_on:
      redis:
        condition: service_started
      pocketbase:
        condition: service_started

    ports:
      - "3000:3000" # Scriberr UI
      - "9243:9243" # Optionally expose JobQueue UI
      #- "8080:8080" # Optionally expose Database Management UI
    environment:
      - OPENAI_API_KEY=
      - OPENAI_ENDPOINT=
      - OPENAI_MODEL=
      - OPENAI_ROLE=user
      - POCKETBASE_ADMIN_EMAIL=admin@example.com
      - POCKETBASE_ADMIN_PASSWORD=1234567890
      - POCKETBASE_URL=http://pocketbase:8080
      - REDIS_HOST=redis
      - REDIS_PORT=6379
      - SCRIBO_FILES=/scriberr
      - DEV_MODE=false
      - NVIDIA=false # set to true if you have one
      - CONCURRENCY=1 # Adjut cautiously according to hardware limits
    volumes:
      - ./scriberr/pb_data:/app/db
      - ./scriberr:/scriberr
      - ./scriberr/models:/models
    networks:
      - scriberr

  redis:
    container_name: redis
    image: redis:7-alpine
    volumes:
      - ./.dockerdata/redis:/data
    networks:
      - scriberr

  pocketbase:
    image: ghcr.io/rishikanthc/pocketbase:22.22
    container_name: pocketbase
    environment:
      - POCKETBASE_ADMIN_EMAIL=admin@example.com  # Replace with your admin email
      - POCKETBASE_ADMIN_PASSWORD=1234567890  # Replace with your admin password
    ports:
      - "8080:8080"  # Expose PocketBase on port 8080
    volumes:
      - ./pb_data:/pb/pb_data  # Mount the PocketBase data directory for persistence
    restart: unless-stopped  # Always restart unless explicitly stopped
    networks:
      - scriberr

networks:
  scriberr:
    external: false

tip, keep the docker compose as minimal as possible i.e. optional fields shouldn't be mentioned other than in the following documentation.