platforms icon indicating copy to clipboard operation
platforms copied to clipboard

Error trying to View Post

Open perkail opened this issue 1 year ago • 1 comments

New posts are visible at the Site URL created on the platform, but when trying to access posts directly, I receive the following on-screen error:

Application error: a server-side exception has occurred (see the server logs for more information). Digest: 2880789430

Here's the corresponding server log:

TypeError: Cannot read properties of null (reading 'replaceAll') at getMdxSource (/var/task/.next/server/chunks/4459.js:146:34) at revalidate (/var/task/.next/server/chunks/4459.js:106:13) at async invokeCallback (/var/task/.next/server/chunks/3738.js:145:32) at async getPostData (/var/task/.next/server/chunks/4459.js:85:12) at async SitePostPage (/var/task/.next/server/app/[domain]/[slug]/page.js:788:18) TypeError: Cannot read properties of null (reading 'replaceAll') at getMdxSource (/var/task/.next/server/chunks/4459.js:146:34) at revalidate (/var/task/.next/server/chunks/4459.js:106:13) at async invokeCallback (/var/task/.next/server/chunks/3738.js:145:32) at async getPostData (/var/task/.next/server/chunks/4459.js:85:12) at async Module.generateMetadata (/var/task/.next/server/app/[domain]/[slug]/page.js:766:18) [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] { digest: '1278174244' } [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] { digest: '2880789430' }

perkail avatar Jul 10 '23 01:07 perkail

can you send me the post URL? I can debug

steven-tey avatar Jul 10 '23 17:07 steven-tey

Yeah. Here is the landing for the Site: https://siteone.exschool.org (Works great)

Now click any post on the page to open the post details view url and I'm still getting the error.

perkail avatar Jul 10 '23 19:07 perkail

Ahh that's because of this code here: https://github.com/vercel/platforms/blob/main/lib/fetchers.ts#L123-L124

I just added a null check so it should work now

steven-tey avatar Jul 10 '23 19:07 steven-tey

So the platform generated this link based on the slug, but when you visit the link you still get the error. Is there a change expected from me to make the URL map to the content? See this link: https://siteone.exschool.org/cljw73rvf0003l3089qhvk4ox

perkail avatar Jul 10 '23 19:07 perkail

Also, when clicking links and visiting routes the URLs aren't being updated

perkail avatar Jul 10 '23 19:07 perkail

What was fix? I have this issue as well

cameronking4 avatar Oct 04 '23 22:10 cameronking4

@steven-tey I have this issue as well, any way to resolve. Here are my examples: qashboard.com support.plus

cameronking4 avatar Oct 04 '23 23:10 cameronking4