Skip to content

RangeError: Invalid time value in /app/node_modules/node-cron/dist/esm/time/localized-time.js:52 #295

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

Closed
davidfiala opened this issue May 22, 2025 · 4 comments

Comments

@davidfiala
Copy link

davidfiala commented May 22, 2025

A fresh self-host install loops with this crash.

docker compose logs -f at git commit ce96e27

backend     | [i] No changes detected
backend     | Starting application...
backend     | 2025-05-22T00:18:28.508Z WARN [Better Auth]: Social provider google is missing clientId or clientSecret
backend     | 2025-05-22T00:18:28.512Z WARN [Better Auth]: Social provider github is missing clientId or clientSecret
backend     | GeoIP database loaded successfully
backend     | Starting server...
backend     | Initializing cron jobs...
backend     | 2025-05-22 00:18:29.029+0000 - info - Server listening at http://127.0.0.1:3001
backend     | 2025-05-22 00:18:29.030+0000 - info - Server listening at http://172.18.0.4:3001
backend     | /app/node_modules/node-cron/dist/esm/time/localized-time.js:52
backend     |     const parts = dateFormat.formatToParts(date).filter(part => {
backend     |                              ^
backend     |
backend     | RangeError: Invalid time value
backend     |     at DateTimeFormat.formatToParts (<anonymous>)
backend     |     at buidDateParts (/app/node_modules/node-cron/dist/esm/time/localized-time.js:52:30)
backend     |     at LocalizedTime.set (/app/node_modules/node-cron/dist/esm/time/localized-time.js:32:22)
backend     |     at findNextDateIgnoringWeekday (/app/node_modules/node-cron/dist/esm/time/matcher-walker.js:41:18)
backend     |     at MatcherWalker.matchNext (/app/node_modules/node-cron/dist/esm/time/matcher-walker.js:73:22)
backend     |     at TimeMatcher.getNextMatch (/app/node_modules/node-cron/dist/esm/time/time-matcher.js:36:29)
backend     |     at getDelay (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:163:33)
backend     |     at Runner.start (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:110:12)
backend     |     at InlineScheduledTask.start (/app/node_modules/node-cron/dist/esm/tasks/inline-scheduled-task.js:84:25)
backend     |     at Module.schedule (/app/node_modules/node-cron/dist/esm/node-cron.js:24:10)
backend     |
backend     | Node.js v20.19.2
backend exited with code 1
backend     |
backend     | > [email protected] db:push
backend     | > drizzle-kit push --config=drizzle.config.ts --force
backend     |
backend     | Reading config file '/app/drizzle.config.ts'
backend     | Using 'pg' driver for database querying
backend     | [⣷] Pulling schema from database...
[⣯] Pulling schema from database...
[⣟] Pulling schema from database...
[⡿] Pulling schema from database...
[✓] Pulling schema from database...
backend     | [i] No changes detected
backend     | Starting application...
@davidfiala
Copy link
Author

After deleting the containers and volumes and trying again, this error is gone.

Unfortunately I do not have the hashes of the docker containers that were used at the time the error occurred.

@goldflag
Copy link
Collaborator

Yea this happens occasionally for me too, but it always works when I try again. Might try a different cron lib

@davidfiala
Copy link
Author

Hmm.

I didn't choose the cron library though. I didn't even know rybbit had one.

Isn't this worth investigating/keeping open? 😕

I worry it could break again.

@davidfiala
Copy link
Author

For future readers, here's the conclusion: #302 (comment)

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

No branches or pull requests

2 participants