[GH-ISSUE #4021] [bug]: Invalid unit value NaN #1422

Closed
opened 2026-03-16 20:17:15 +03:00 by kerem · 2 comments
Owner

Originally created by @T00rk on GitHub (Apr 30, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4021

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

My configuration only enables EMAIL as VITE_ALLOWED_AUTH_PROVIDERS.
Everytime I try to signin, I get a 500 error with these details in the log file :

Backend Server | [Nest] 39  - 04/30/2024, 9:46:47 AM   ERROR [ExceptionsHandler] Invalid unit value NaN
Backend Server | Error: Invalid unit value NaN
Backend Server |     at asNumber (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:1497:87)
Backend Server |     at normalizeObject (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:1506:35)
Backend Server |     at Duration.fromObject (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:2529:15)
Backend Server |     at Duration.fromDurationLike (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:2552:23)
Backend Server |     at DateTime.plus (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:6091:26)
Backend Server |     at AuthService.generateMagicLinkTokens (/usr/src/app/packages/hoppscotch-backend/dist/auth/auth.service.js:40:14)
Backend Server |     at async AuthService.signInMagicLink (/usr/src/app/packages/hoppscotch-backend/dist/auth/auth.service.js:147:33)
Backend Server |     at async AuthController.signInMagicLink (/usr/src/app/packages/hoppscotch-backend/dist/auth/auth.controller.js:47:31)
Backend Server |     at async /usr/src/app/node_modules/.pnpm/@nestjs+core@10.2.7_@nestjs+common@10.2.7_reflect-metadata@0.1.13_rxjs@7.6.0__@nestjs+platfor_fugnss62jk6fg5tp4mizlu2qtu/node_modules/@nestjs/core/router/router-execution-context.js:46:28
Backend Server |     at async /usr/src/app/node_modules/.pnpm/@nestjs+core@10.2.7_@nestjs+common@10.2.7_reflect-metadata@0.1.13_rxjs@7.6.0__@nestjs+platfor_fugnss62jk6fg5tp4mizlu2qtu/node_modules/@nestjs/core/router/router-proxy.js:9:17

Steps to reproduce

1 - Set VITE_ALLOWED_AUTH_PROVIDERS: "EMAIL"
2 - Click "Signin"
3 - Select "Continue with email"
4 - Enter your email address and click "Send magic link"

Environment

Production

Version

Self-hosted

Originally created by @T00rk on GitHub (Apr 30, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4021 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior My configuration only enables `EMAIL` as `VITE_ALLOWED_AUTH_PROVIDERS`. Everytime I try to signin, I get a 500 error with these details in the log file : ```bash Backend Server | [Nest] 39 - 04/30/2024, 9:46:47 AM ERROR [ExceptionsHandler] Invalid unit value NaN Backend Server | Error: Invalid unit value NaN Backend Server | at asNumber (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:1497:87) Backend Server | at normalizeObject (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:1506:35) Backend Server | at Duration.fromObject (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:2529:15) Backend Server | at Duration.fromDurationLike (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:2552:23) Backend Server | at DateTime.plus (/usr/src/app/node_modules/.pnpm/luxon@3.2.1/node_modules/luxon/build/node/luxon.js:6091:26) Backend Server | at AuthService.generateMagicLinkTokens (/usr/src/app/packages/hoppscotch-backend/dist/auth/auth.service.js:40:14) Backend Server | at async AuthService.signInMagicLink (/usr/src/app/packages/hoppscotch-backend/dist/auth/auth.service.js:147:33) Backend Server | at async AuthController.signInMagicLink (/usr/src/app/packages/hoppscotch-backend/dist/auth/auth.controller.js:47:31) Backend Server | at async /usr/src/app/node_modules/.pnpm/@nestjs+core@10.2.7_@nestjs+common@10.2.7_reflect-metadata@0.1.13_rxjs@7.6.0__@nestjs+platfor_fugnss62jk6fg5tp4mizlu2qtu/node_modules/@nestjs/core/router/router-execution-context.js:46:28 Backend Server | at async /usr/src/app/node_modules/.pnpm/@nestjs+core@10.2.7_@nestjs+common@10.2.7_reflect-metadata@0.1.13_rxjs@7.6.0__@nestjs+platfor_fugnss62jk6fg5tp4mizlu2qtu/node_modules/@nestjs/core/router/router-proxy.js:9:17 ``` ### Steps to reproduce 1 - Set `VITE_ALLOWED_AUTH_PROVIDERS: "EMAIL"` 2 - Click "Signin" 3 - Select "Continue with email" 4 - Enter your email address and click "Send magic link" ### Environment Production ### Version Self-hosted
kerem 2026-03-16 20:17:15 +03:00
Author
Owner

@T00rk commented on GitHub (May 1, 2024):

Resolved setting MAGIC_LINK_TOKEN_VALIDITY: 3.
I thought there were default values for Docker environment variables.

<!-- gh-comment-id:2088048326 --> @T00rk commented on GitHub (May 1, 2024): Resolved setting `MAGIC_LINK_TOKEN_VALIDITY: 3`. I thought there were default values for Docker environment variables.
Author
Owner

@balub commented on GitHub (May 1, 2024):

@T00rk has your issue been resolved ?

<!-- gh-comment-id:2088091133 --> @balub commented on GitHub (May 1, 2024): @T00rk has your issue been resolved ?
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/hoppscotch#1422
No description provided.