calcom / cal.com

Scheduling infrastructure for absolutely everyone.
https://cal.com
Other
31.4k stars 7.6k forks source link

"This page does not exist." on every event page - also on docker #14483

Closed timowevel1 closed 4 months ago

timowevel1 commented 5 months ago

Found a bug? Please fill out the sections below. 👍

Issue Summary

A summary of the issue. This needs to be a clear detailed-rich summary.

Steps to Reproduce

  1. Went to a event page (/username/15-min)

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

Actual Results

Expected Results

Evidence

dosubot[bot] commented 5 months ago

Hey @timowevel1! Great to see you back, though I wish it were under better circumstances. Let's crack this enigma of the vanishing event pages together!

It looks like the issue with receiving a 404 error on every event page might be related to the setup of dynamic routes in your Next.js application. For handling routes like /username/15-min, ensure you have a file named [username]/[event].tsx in the pages directory to correctly route requests to your EventPage component. Here's a quick example:

// pages/[username]/[event].tsx
import { useRouter } from 'next/router';

const EventPage = () => {
  const router = useRouter();
  const { username, event } = router.query;

  return (
    <div>
      <h1>Event Page</h1>
      <p>Username: {username}</p>
      <p>Event: {event}</p>
    </div>
  );
};

export default EventPage;

Make sure that:

Additionally, there's a related issue on the cal.com repository suggesting to remove the ALLOWED_HOSTNAMES variable from your .env file to resolve a similar 404 error issue. However, be cautious as this might introduce warnings regarding the WEBAPP_URL and ALLOWED_HOSTNAMES match in the logs.

If these steps don't resolve your issue, reviewing the Next.js documentation on dynamic routing and ensuring your deployment environment is correctly configured for Next.js applications might provide further insights.

Sources

#### About Dosu This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
dynahpointch commented 5 months ago

i receive the following error in the log if i open a event page with a 404 error in v3.9.7

@calcom/web:start: ⚠ metadata.metadataBase is not set for resolving social open graph or twitter images, using "http://localhost:3000". See https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase @calcom/web:start: themeBasis is required for booking page theme support. Not providing it will cause theme flicker. @calcom/web:start: react-i18next:: You will need to pass in an i18next instance by using initReactI18next @calcom/web:start: Warning: data for page "/auth/login" is 150 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance. @calcom/web:start: See more info here: https://nextjs.org/docs/messages/large-page-data

and where is this folder please specify ut with the full folder recursive from the \ root folder. ensure you have a file named [username]/[event].tsx in the pages directory to correctly route requests to your EventPage

PeerRich commented 4 months ago

self-hosting help is great inside discord: https://go.cal.com/discord or via a commercial agreement with our engineers: https://cal.com/sales

lippoliv commented 2 months ago

I'm having the same issue, any ideas?