Skip to content

fix: return 404 for apps without a setup page#27762

Closed
AhmadYasser1 wants to merge 1 commit intocalcom:mainfrom
AhmadYasser1:fix/app-setup-404-not-found
Closed

fix: return 404 for apps without a setup page#27762
AhmadYasser1 wants to merge 1 commit intocalcom:mainfrom
AhmadYasser1:fix/app-setup-404-not-found

Conversation

@AhmadYasser1
Copy link
Copy Markdown
Contributor

Summary

  • Shows a proper 404 page instead of a blank screen when visiting /apps/{slug}/setup for apps that don't have a setup page

Changes

  • packages/app-store/_pages/setup/_getServerSideProps.tsx: Return { notFound: true } instead of { props: {} } when the slug is not in AppSetupPageMap

Root Cause

When visiting /apps/umami/setup (or any app not in AppSetupPageMap), getServerSideProps returns { props: {} }. The DynamicComponent then receives a slug with no matching component and returns null, rendering a blank screen. Users report this as a bug (see #23801).

Fix

Return { notFound: true } for apps not in AppSetupPageMap, which tells Next.js to render the 404 page.

Test plan

  • Visit /apps/umami/setup → shows 404 page instead of blank screen
  • Visit /apps/stripe/setup → still works correctly (app is in AppSetupPageMap)
  • Biome lint passes — no new warnings

Fixes #24128

@github-actions github-actions Bot added Low priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input 🐛 bug Something isn't working labels Feb 8, 2026
@AhmadYasser1 AhmadYasser1 marked this pull request as ready for review February 8, 2026 23:33
@graphite-app graphite-app Bot added the community Created by Linear-GitHub Sync label Feb 8, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link
Copy Markdown
Member

@romitg2 romitg2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AhmadYasser1 Thanks for PR! could you please add add before/after visual demo

@AhmadYasser1
Copy link
Copy Markdown
Contributor Author

Before

Screenshot 2026-02-08 at 11 31 15 PM

After

image

@AhmadYasser1
Copy link
Copy Markdown
Contributor Author

@AhmadYasser1 Thanks for PR! could you please add add before/after visual demo

@romitg2 Does this work?

@romitg2 romitg2 added ready-for-e2e run-ci Approve CI to run for external contributors labels Feb 9, 2026
@romitg2
Copy link
Copy Markdown
Member

romitg2 commented Feb 9, 2026

@AhmadYasser1 there seems to be some failing tests related to changes in this PR, can you please fix them.

https://github.com/calcom/cal.com/actions/runs/21812508579/job/62929175710?pr=27762

Copy link
Copy Markdown
Member

@dhairyashiil dhairyashiil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failing test is a known issue, it was also failing on the other PR (linked to issue). Additionally users cannot access the /setup page from the UI for apps without a setup page, so this issue isnt very meaningful to work on.

That said, if you can make the tests pass, I am happy to merge this PR. Otherwise we can close the issue. Let me know you think

@dhairyashiil dhairyashiil marked this pull request as draft February 9, 2026 06:28
@AhmadYasser1
Copy link
Copy Markdown
Contributor Author

@romitg2 @dhairyashiil The failing test is no-show-updated-action.integration-test.ts — a booking-audit integration test completely unrelated to this change. My PR only touches packages/app-store/_pages/setup/_getServerSideProps.tsx (one line to return 404 for unknown slugs).

The Stripe setup tests all pass locally (15/15). Happy to keep this open if you'd like to merge, or close it if you feel the issue isn't meaningful enough. Let me know!

@AhmadYasser1 AhmadYasser1 marked this pull request as ready for review February 9, 2026 13:04
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Change the app setup getServerSideProps to return `notFound: true`
instead of empty props when the app slug has no setup page entry.
This shows a proper 404 page instead of a blank screen.

Fixes calcom#24128
@AhmadYasser1 AhmadYasser1 force-pushed the fix/app-setup-404-not-found branch from ab1acd2 to c060240 Compare February 10, 2026 02:54
@AhmadYasser1
Copy link
Copy Markdown
Contributor Author

@dhairyashiil @romitg2 rebased on latest main to retrigger CI. the failing test (no-show-updated-action integration test) passes on other recently merged PRs like #27814 and #27782, so it looks like it was a flaky run rather than something my change caused. this PR only touches one line in _getServerSideProps.tsx. let me know how it goes!

@AhmadYasser1
Copy link
Copy Markdown
Contributor Author

@dhairyashiil hey, i rebased on latest main to pick up any fixes but the CI is skipping now because the run-ci label was added before the new SHA. could you remove and re-add the run-ci label so CI triggers? thanks!

@dhairyashiil dhairyashiil removed the run-ci Approve CI to run for external contributors label Feb 10, 2026
@dhairyashiil dhairyashiil added the run-ci Approve CI to run for external contributors label Feb 10, 2026 — with Graphite App
@dhairyashiil
Copy link
Copy Markdown
Member

I have tried this multiple times. I told you this is a known issue; tests were failing for this code change:

Screenshot 2026-02-10 at 1 58 19 PM

I am also aware that it is not directly related to your PR, but I have seen the same pattern in another PR as well, it had the same code change. In my opinion, its not worth the effort to work on this right now. There are many important, higher-priority issues we can focus on.

Closing both the PR and the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working community Created by Linear-GitHub Sync Low priority Created by Linear-GitHub Sync ready-for-e2e run-ci Approve CI to run for external contributors size/XS ui area: UI, frontend, button, form, input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apps without a setup page should show 404

3 participants