🐛 Bug Report: Console `/join` shows an endless spinner for invited users who are not signed in
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, react, typescript
- Domain
- authentication, frontend
Research direction
Start in src/lib/react-query/hooks/auth.ts, at consoleAccountQueryOptions(), and check how the account query's retryOnMount default interacts with AuthFlowAccountSwitcher, which calls useAuth() on the accept screen. Reproduce by opening /join with membershipId, userId, secret and teamId while signed out. Done when the accept screen appears for a guest without the spinner looping, and sign-in and organization pages still load.
Written by the indexing model from the issue text.
Description
👟 Reproduction steps
- Self-hosted Appwrite 2.5.0 with Console image
appwrite/new:1.2.74-self-hosted. - Organization → Members → Invite a new email address.
- Open the invite link (
/join?membershipId=…&userId=…&secret=…&teamId=…) in a private window, i.e. not signed in.
👍 Expected behavior
The "Accept invitation" screen is shown and the invite can be accepted, as in 1.1.107-self-hosted (fix for #13724).
👎 Actual Behavior
A spinner is shown indefinitely. GET /v1/account returns 401 once, no further requests are made, and there is no error in the browser console. Users who are already signed in are not affected.
Cause: a render loop on the invite screen.
- For a guest, the account query ends with 401,
useAuth().isLoadingbecomesfalse, and the screen switches fromloadingtoaccept. - The
acceptscreen rendersAuthFlowAccountSwitcher, which callsuseAuth()again. - The new observer refetches the failed query on mount, because
retryOnMountdefaults totrueinconsoleAccountQueryOptions()(src/lib/react-query/hooks/auth.ts). - The screen returns to
loading, the switcher unmounts, the cached 401 is replayed, and the cycle repeats.
Adding retryOnMount: false to consoleAccountQueryOptions() fixes it. With this change applied to 1.2.74-self-hosted, the invite is accepted normally, and sign-in and the organization pages keep working.
| Console image | Guest on /join |
|---|---|
1.1.107-self-hosted |
works |
1.1.159-self-hosted |
endless spinner |
1.2.74-self-hosted |
endless spinner |
🎲 Appwrite version
Different version (specify in environment)
💻 Operating system
Linux
🧱 Your Environment
Appwrite 2.5.0 (also reproduced with 2.3.0), self-hosted with Docker Compose, Console appwrite/new:1.2.74-self-hosted. Reproduced on a fresh installation without modifications.
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
Related: #13724
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
- Dominant language
- TypeScript
- Stars
- 57.7k
- Forks
- 5.8k
- Avg merge
- 19h 50m
- Merged PRs (30d)
- 489
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from appwrite/appwrite
-
🐛 Bug Report: Server-side token and session events carry the plaintext `secret` to realtime and webhooksPossibly taken @HarshMN2345 claimed this 1 day ago. Openapi / realtime product / auth product / messaging product / sites
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Bug Report: S3 device signs content-length on bodyless GET/HEAD, breaks R2 reads (403 SignatureDoesNotMatch)Possibly taken @HarshMN2345 claimed this 1 day ago. Openproduct / self-hosted product / storage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
appwrite/appwrite#14326 · 1 comment ·
Maintainers usually reply within 1 day
-
🐛 Bug Report: Transaction upsert ignores rowId and creates a new rowPossibly taken @HarshMN2345 claimed this 9 days ago. Openproduct / databases
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
appwrite/appwrite#14178 · 1 comment ·
Maintainers usually reply within 1 day
-
Declare the Location header on OAuth2 redirect responses in the OpenAPI specPossibly taken @HarshMN2345 claimed this 9 days ago. Openproduct / auth product / databases product / messaging product / sites sdk / cli
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
🐛 Bug Report: Function executions with bodies > 1 MiB wait 2 s (`Expect: 100-continue`)Possibly taken A pull request linked to this issue is open or already merged. Openproduct / databases product / functions product / self-hosted product / storage sdk / cli
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
All issues in appwrite/appwrite
Similar issues
-
`cf complete zsh >> .zshrc` fails on vanilla zshMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cloudflare/cf#340 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Rename Madson cameraOpen
Difficulty 2/5 Under an hour Newbie friendliness 75/100
StoDevX/AAO-React-Native#8785 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitPossibly taken @myOmikron claimed this today. Openbug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 82/100