infisical icon indicating copy to clipboard operation
infisical copied to clipboard

Infinite loading on page load

Open maxbec opened this issue 3 months ago • 4 comments

Describe the bug

Image

When entering the url of self hosted infisical instance the app is infinitely loading with the icon above. In the logs it says refresh token not found.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

It should login.

Screenshots

If applicable, add screenshots to help explain your problem.

Platform you are having the issue on:

Docker Container

Additional context

2025/09/25 02:37PM 40 pid=1 hostname=ba1c5d3de957 reqId=req-7rSbBEFZK8gZBQ severity=WARNING err={"type":"FastifyError","message":"Reply was already sent, did you forget to \"return reply\" in \"/infisical.ico\" (GET)?","stack":"FastifyError: Reply was already sent, did you forget to \"return reply\" in \"/infisical.ico\" (GET)?\n    at Reply.send (/backend/node_modules/fastify/lib/reply.js:151:26)\n    at PassThrough.flush [as _flush] (/backend/node_modules/@fastify/static/index.js:235:17)\n    at PassThrough.final [as _final] (node:internal/streams/transform:128:10)\n    at prefinish (node:internal/streams/writable:916:14)\n    at finishMaybe (node:internal/streams/writable:930:5)\n    at Writable.end (node:internal/streams/writable:845:5)\n    at ReadStream.onend (node:internal/streams/readable:948:10)\n    at Object.onceWrapper (node:events:638:28)\n    at ReadStream.emit (node:events:536:35)\n    at ReadStream.emit (node:domain:489:12)","code":"FST_ERR_REP_ALREADY_SENT","name":"FastifyError","statusCode":500} msg=Reply was already sent, did you forget to "return reply" in "/infisical.ico" (GET)?

2025/09/25 02:37PM 30 pid=1 hostname=ba1c5d3de957 reqId=req-PGyT43BSXB1rIV severity=INFO req={"method":"POST","url":"/api/v1/auth/token","hostname":"i***.de","remoteAddress":"***","remotePort":36126} msg=incoming request

2025/09/25 02:37PM 50 pid=1 hostname=ba1c5d3de957 reqId=req-PGyT43BSXB1rIV severity=ERROR err={"type":"NotFoundError","message":"Failed to find refresh token","stack":"AuthTokenNotFound: Failed to find refresh token\n    at Object.validateRefreshToken (/backend/src/services/auth-token/auth-token-service.ts:157:13)\n    at Object.handler (/backend/src/server/routes/v1/auth-router.ts:89:78)\n    at preHandlerCallback (/backend/node_modules/fastify/lib/handleRequest.js:138:37)\n    at validationCompleted (/backend/node_modules/fastify/lib/handleRequest.js:122:5)\n    at preValidationCallback (/backend/node_modules/fastify/lib/handleRequest.js:99:5)\n    at IncomingMessage.next (/backend/node_modules/fastify/lib/hooks.js:233:9)\n    at AsyncResource.runInAsyncScope (node:async_hooks:206:9)\n    at Object.<anonymous> (/backend/node_modules/@fastify/request-context/index.js:53:21)\n    at hookIterator (/backend/node_modules/fastify/lib/hooks.js:405:10)\n    at next (/backend/node_modules/fastify/lib/hooks.js:239:18)","name":"AuthTokenNotFound"} msg=Failed to find refresh token```

maxbec avatar Sep 25 '25 12:09 maxbec

Hey @maxbec

We tried to reproduce this and it seems to be working fine on our side. Can you please fill in steps to produce?

Are you using docker compose version to deploy? Please share your infrastructure setup as well.

akhilmhdh avatar Sep 26 '25 06:09 akhilmhdh

New to Infisical and just set it up today and have been seeing the same behavior and errors as @maxbec . I had the following variables set in my environment "infisical.rb" file:

infisical_core['HTTPS_ENABLED'] = 'true' infisical_core['SITE_URL'] = 'https://mycustomurl.com'

Once I commented them out and ran "infisical-ctl reconfigure" it appears to be working correctly. Also tested password reset to ensure it still works. One thing to note is when you request a password reset the URL in the password reset link only has the token portion.

grayfoxcomputing avatar Sep 28 '25 04:09 grayfoxcomputing

Hello,

I've been able to reproduce this issue, and it seems quite straightforward:

  1. Open the Infisical website.
  2. Immediately switch to a new tab, open another app, or navigate elsewhere.
  3. When you return to the Infisical website, you'll notice that the loading process fails and enters an infinite loading loop.

I've observed that network requests stop after switching to a new tab. I've attached screenshots to illustrate this behavior more clearly.

I tested this on the official Infisical cloud website, and the issue occurs there as well. This also affects usage in my own project. Hence this issue is currently live on the Infisical Cloud, Not just Docker Compose.

Image Image

SafuGit avatar Oct 05 '25 11:10 SafuGit

I'll try to debug this issue further and try to find a solution aswell.

SafuGit avatar Oct 05 '25 11:10 SafuGit