makeplane / makeplane/plane

[bug]: Expired session causes endless reload loop / error boundary instead of the sign-in screen

Open Beginner friendly
#9,861 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
59.6k
Forks
5.8k
Avg merge
1d 22h
Merged PRs (30d)
49

Description

Current Behavior

When the session cookie expires while the web app is open, the user is not returned to the sign-in screen. Depending on timing they either land on an error boundary ("Looks like something went wrong") or the page keeps reloading.

Steps to Reproduce
  1. Sign in, keep the tab open until the session expires (or invalidate the server-side session).
  2. Interact with the app (e.g. open a work items list): the request returns 401.
  3. The axios response interceptor in apps/web/core/services/api.service.ts runs window.location.replace("/?next_path=<currentPath>").
  4. The entry page "/" mounts and fires its own current-user request; that request 401s too.
  5. The interceptor runs again — now currentPath is "/", so it replaces "/" with "/?next_path=/", reloading the entry page in an endless loop. The NON_AUTHENTICATED branch of AuthenticationWrapper never gets a stable chance to render the sign-in form.
Root Cause

The 401 interceptor redirects unconditionally, including for requests made by the entry page itself, producing a self-referential replace loop on "/".

Suggested Fix

Skip the redirect when window.location.pathname is already "/". A PR follows with the one-line guard.

Environment
  • Self-hosted v1.4.2 built from source.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/web/core/services/api.service.ts and trace the 401 response interceptor, then inspect the entry page and AuthenticationWrapper behavior described in the report. Reproduce the expired-session case and verify that the root path reaches the sign-in screen without an error boundary or reload loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
api, authentication, frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.