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

Problem with setting CRAWLER_JOB_TIMEOUT_SEC in env - log: "Expected number, received string" #134

Closed
Deathproof76 opened this issue May 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Deathproof76
Copy link

Hi, really great project! Thank you very much for sharing!

I tried to change the crawler timeouts via environment in the compose.yaml, but I can't seem to find a way without it being interpreted as a string. Upon starting the stack the workers log outputs the following errors:

hoarder-workers-1      | 
hoarder-workers-1      | > @hoarder/workers@0.1.0 start:prod /app/apps/workers
hoarder-workers-1      | > tsx index.ts
hoarder-workers-1      | 
hoarder-workers-1      | /app/apps/workers/node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/types.js:43
hoarder-workers-1      |                 const error = new ZodError_1.ZodError(ctx.common.issues);
hoarder-workers-1      |                               ^
hoarder-workers-1      | 
hoarder-workers-1      | ZodError: [
hoarder-workers-1      |   {
hoarder-workers-1      |     "code": "invalid_type",
hoarder-workers-1      |     "expected": "number",
hoarder-workers-1      |     "received": "string",
hoarder-workers-1      |     "path": [
hoarder-workers-1      |       "CRAWLER_JOB_TIMEOUT_SEC"
hoarder-workers-1      |     ],
hoarder-workers-1      |     "message": "Expected number, received string"
hoarder-workers-1      |   },
hoarder-workers-1      |   {
hoarder-workers-1      |     "code": "invalid_type",
hoarder-workers-1      |     "expected": "number",
hoarder-workers-1      |     "received": "string",
hoarder-workers-1      |     "path": [
hoarder-workers-1      |       "CRAWLER_NAVIGATE_TIMEOUT_SEC"
hoarder-workers-1      |     ],
hoarder-workers-1      |     "message": "Expected number, received string"
hoarder-workers-1      |   }
hoarder-workers-1      | ]

Part of my compose.yml:

  workers:
    image: ghcr.io/mohamedbassem/hoarder-workers:latest
    restart: unless-stopped
    volumes:
      - /mnt/Dockerspace/hoarder/web:/data
    environment:
      REDIS_HOST: redis
      CRAWLER_JOB_TIMEOUT_SEC: 120
      CRAWLER_NAVIGATE_TIMEOUT_SEC: 60

Also tried via env_file

  workers:
    image: ghcr.io/mohamedbassem/hoarder-workers:latest
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - /mnt/Dockerspace/hoarder/web:/data

containing

      CRAWLER_JOB_TIMEOUT_SEC=120
      CRAWLER_NAVIGATE_TIMEOUT_SEC=60

resulting in the same error.

@MohamedBassem
Copy link
Collaborator

Hi, this was indeed a bug that I thought I fixed. Are you on the latest release? You can check from admin panel of the web UI

@Deathproof76
Copy link
Author

I was on ghcr.io/mohamedbassem/hoarder-web:latest, ghcr.io/mohamedbassem/hoarder-workers:latest.
The admin panel actually showed that a newer release was available so I downed and removed the stack and pulled :0.13.1.
Started the stack without setting TIMEOUT_SEC in env. Admin shows Server Version 0.13.1.

Retried setting in the compose.yaml via:

    environment:
      REDIS_HOST: redis
      CRAWLER_JOB_TIMEOUT_SEC: 120
      CRAWLER_NAVIGATE_TIMEOUT_SEC: 60

and restarted the stack but the error remains.

@MohamedBassem MohamedBassem added the bug Something isn't working label May 3, 2024
@MohamedBassem
Copy link
Collaborator

@Deathproof76 sorry about that. I thought I fixed them but apparently I didn't. Pushed the fix now, the docker containers take some time to build (~40mins) once they are built, you can go back to latest and the problem will be fixed. Sorry about that!

@Deathproof76
Copy link
Author

You don't have to be sorry for anything mate! 😄 Honestly, thank you very much for this fantastic app and all the effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants